Bug 1470229 part 2 - Allow aria attributes. r=hsivonen

MozReview-Commit-ID: 6tDCQLHYsH7

--HG--
extra : rebase_source : 763191826555a9cb61a4e27e271b574832df997f
This commit is contained in:
Xidorn Quan 2018-06-22 15:29:43 +10:00
Родитель 17affe0a42
Коммит 5915d041b6
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -1247,8 +1247,10 @@ nsTreeSanitizer::SanitizeAttributes(mozilla::dom::Element* aElement,
uint32_t localLen = attrLocal->GetLength();
// Allow underscore to cater to the MCE editor library.
// Allow data-* on SVG and MathML, too, as a forward-compat measure.
// Allow aria-* on all for simplicity.
if (UTF16StringStartsWith(localStr, localLen, u"_") ||
UTF16StringStartsWith(localStr, localLen, u"data-")) {
UTF16StringStartsWith(localStr, localLen, u"data-") ||
UTF16StringStartsWith(localStr, localLen, u"aria-")) {
continue;
}
// else not allowed