mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
No issue - Escape < and > in element attribute values.
Per spec, extend escaping of attribute value characters to include `<` and `>`. We already did this for text fragments, and it makes sense to apply the same to attribute values. We are at parity with mainstream that default-escape attribute values this way in current releases.
This commit is contained in:
parent
5960178802
commit
3c2c7ce1e2
1 changed files with 12 additions and 0 deletions
|
|
@ -9359,6 +9359,12 @@ private:
|
|||
case 0x00A0:
|
||||
aOut.AppendLiteral(" ");
|
||||
break;
|
||||
case '<':
|
||||
aOut.AppendLiteral("<");
|
||||
break;
|
||||
case '>':
|
||||
aOut.AppendLiteral(">");
|
||||
break;
|
||||
default:
|
||||
aOut.Append(*c);
|
||||
break;
|
||||
|
|
@ -9500,6 +9506,12 @@ AppendEncodedAttributeValue(nsAutoString* aValue, StringBuilder& aBuilder)
|
|||
case 0x00A0:
|
||||
extraSpaceNeeded += ArrayLength(" ") - 2;
|
||||
break;
|
||||
case '<':
|
||||
extraSpaceNeeded += ArrayLength("<") - 2;
|
||||
break;
|
||||
case '>':
|
||||
extraSpaceNeeded += ArrayLength(">") - 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue