Bug 1375701 - Atomize class attribute value in the parser in the innerHTML case

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 06:12:55 -04:00 committed by Roy Tam
commit fe13c5bffc
14 changed files with 275 additions and 153 deletions

View file

@ -225,7 +225,7 @@ nsHtml5Tokenizer::emitOrAppendCharRefBuf(int32_t returnState)
nsHtml5String
nsHtml5Tokenizer::strBufToString()
{
nsHtml5String str = nsHtml5Portability::newStringFromBuffer(strBuf, 0, strBufLen, tokenHandler);
nsHtml5String str = nsHtml5Portability::newStringFromBuffer(strBuf, 0, strBufLen, tokenHandler, !newAttributesEachTime && attributeName == nsHtml5AttributeName::ATTR_CLASS);
clearStrBufAfterUse();
return str;
}