Skip to content

Commit 76acd04

Browse files
committed
Mozilla bug 1534346 - Mark malformed SVG scripts as malformed for real. r=alchen
1 parent b19d408 commit 76acd04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/nu/validator/htmlparser/impl/TreeBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3361,7 +3361,7 @@ public final void endTag(ElementName elementName) throws SAXException {
33613361
}
33623362
if (stack[eltPos].name == name) {
33633363
while (currentPtr >= eltPos) {
3364-
popForeign(origPos);
3364+
popForeign(origPos, eltPos);
33653365
}
33663366
break endtagloop;
33673367
}
@@ -5227,10 +5227,10 @@ private void pop() throws SAXException {
52275227
node.release(this);
52285228
}
52295229

5230-
private void popForeign(int origPos) throws SAXException {
5231-
StackNode<T> node = stack[currentPtr];
5232-
if (origPos != currentPtr) {
5233-
markMalformedIfScript(node.node);
5230+
private void popForeign(int origPos, int eltPos) throws SAXException {
5231+
StackNode<T> node = stack[currentPtr];
5232+
if (origPos != currentPtr || eltPos != currentPtr) {
5233+
markMalformedIfScript(node.node);
52345234
}
52355235
assert debugOnlyClearLastStackSlot();
52365236
currentPtr--;

0 commit comments

Comments
 (0)