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

Commit

Permalink
fix tag balancing logics
Browse files Browse the repository at this point in the history
- logics simplified
- optional tags are ignored during balancing
- ignore self-closing solidus, which is required only for foreign
elements
  • Loading branch information
adon committed Aug 17, 2015
1 parent da0c27c commit 65129b3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test-vectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,16 @@ var generalVectors = [
id: 50,
input: "abc <!-- 123",
output: "abc "
},
{
id: 51,
input: "<img src=\"x\" id=\'\" onerror=\"alert(1)\' />",
output: "<img src=\"x\" id=\'\" onerror=\"alert(1)\' />"
},
{
id: 52,
input: "<a href='http://www.yahoo.com/' />hello",
output: "<a href='http://www.yahoo.com/'>hello</a>"
}
];

Expand Down

0 comments on commit 65129b3

Please sign in to comment.