Bug 1411707 - Allow tag names without dashes in Custom Elements in XUL
MozReview-Commit-ID: HEamLIGaw59
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -3240,16 +3240,21 @@ nsContentUtils::NewURIWithDocumentCharse
}
return NS_NewURI(aResult, aSpec, nullptr, aBaseURI, sIOService);
}
// static
bool
nsContentUtils::IsCustomElementName(nsAtom* aName)
{
+ // For browser chrome allow non-dashed names
+ if (XRE_IsParentProcess()) {
+ return true;
+ }
+
// A valid custom element name is a sequence of characters name which
// must match the PotentialCustomElementName production:
// PotentialCustomElementName ::= [a-z] (PCENChar)* '-' (PCENChar)*
const char16_t* name = aName->GetUTF16String();
uint32_t len = aName->GetLength();
bool hasDash = false;
if (!len || name[0] < 'a' || name[0] > 'z') {