Skip to content
This repository was archived by the owner on Jul 15, 2019. It is now read-only.

Commit 65129b3

Browse files
author
adon
committed
fix tag balancing logics
- logics simplified - optional tags are ignored during balancing - ignore self-closing solidus, which is required only for foreign elements
1 parent da0c27c commit 65129b3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test-vectors.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,16 @@ var generalVectors = [
831831
id: 50,
832832
input: "abc <!-- 123",
833833
output: "abc "
834+
},
835+
{
836+
id: 51,
837+
input: "<img src=\"x\" id=\'\" onerror=\"alert(1)\' />",
838+
output: "<img src=\"x\" id=\'\" onerror=\"alert(1)\' />"
839+
},
840+
{
841+
id: 52,
842+
input: "<a href='http://www.yahoo.com/' />hello",
843+
output: "<a href='http://www.yahoo.com/'>hello</a>"
834844
}
835845
];
836846

0 commit comments

Comments
 (0)