p4ulypops / jquery-clean

Automatically exported from code.google.com/p/jquery-clean
0 stars 0 forks source link

browser freeze #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

This code seems to freeze the browser (chrome)

console.log( $.htmlClean("test <script test") );

Original issue reported on code.google.com by garrynewman@gmail.com on 7 Aug 2013 at 1:11

GoogleCodeExporter commented 9 years ago
same issue with the following:
`<hr />some things<script> <a style="color:red" href="#">hu?</a>`

chrome, safari, ff

Original comment by orionr...@gmail.com on 23 Aug 2013 at 12:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I believe this is a fix:

jQuery.htmlClean line: 397
change:
this.toProtect = $.inArray(this.name, tagProtect) > -1;
to:
this.toProtect = $.inArray(this.name, tagProtect) > 0;

See also:
https://github.com/components/jquery-htmlclean/commit/7bb3427bb83c17d1480b8e0e67
335dffe353a12b

Original comment by orionr...@gmail.com on 23 Aug 2013 at 1:02

GoogleCodeExporter commented 9 years ago
Thanks, I'll have a look as soon as I can

Original comment by antixsof...@gmail.com on 14 Oct 2013 at 8:03