From 8b1cecd6b491654ae760a0c75f3270df134c4e25 Mon Sep 17 00:00:00 2001 From: JoeMorgan Date: Fri, 13 Dec 2024 08:59:02 -0500 Subject: [PATCH] Add inert attribute to boolean list (#12729) * added changeset * added changeset --- .changeset/twelve-donuts-hide.md | 5 +++++ packages/astro/src/runtime/server/render/util.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/twelve-donuts-hide.md diff --git a/.changeset/twelve-donuts-hide.md b/.changeset/twelve-donuts-hide.md new file mode 100644 index 000000000000..504d1b5bea41 --- /dev/null +++ b/.changeset/twelve-donuts-hide.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +"Added `inert` to htmlBooleanAttributes" diff --git a/packages/astro/src/runtime/server/render/util.ts b/packages/astro/src/runtime/server/render/util.ts index 9c771a0de02b..d693ad070f3a 100644 --- a/packages/astro/src/runtime/server/render/util.ts +++ b/packages/astro/src/runtime/server/render/util.ts @@ -7,7 +7,7 @@ import { HTMLString, markHTMLString } from '../escape.js'; export const voidElementNames = /^(area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/i; const htmlBooleanAttributes = - /^(?:allowfullscreen|async|autofocus|autoplay|checked|controls|default|defer|disabled|disablepictureinpicture|disableremoteplayback|formnovalidate|hidden|loop|nomodule|novalidate|open|playsinline|readonly|required|reversed|scoped|seamless|selected|itemscope)$/i; + /^(?:allowfullscreen|async|autofocus|autoplay|checked|controls|default|defer|disabled|disablepictureinpicture|disableremoteplayback|formnovalidate|hidden|inert|loop|nomodule|novalidate|open|playsinline|readonly|required|reversed|scoped|seamless|selected|itemscope)$/i; const AMPERSAND_REGEX = /&/g; const DOUBLE_QUOTE_REGEX = /"/g;