prototype: Make String#unescapeHTML strip tags in IE. Closes #10173.
This commit is contained in:
parent
bfee207d1a
commit
c7e0a3d93c
|
@ -1,3 +1,5 @@
|
|||
* Make String#unescapeHTML strip tags in IE. Closes #10173. [kangax]
|
||||
|
||||
* Stop form observers in unit tests. Closes #10938. [kangax]
|
||||
|
||||
* Performance improvements for Enumerables. Closes #11264. [Ben, Samuel Lebeau]
|
||||
|
|
|
@ -211,7 +211,7 @@ if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.proto
|
|||
return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
|
||||
},
|
||||
unescapeHTML: function() {
|
||||
return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
|
||||
return this.stripTags().replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -287,6 +287,7 @@
|
|||
assertEqual(largeTextUnescaped, largeTextEscaped.unescapeHTML());
|
||||
|
||||
assertEqual('1\n2', '1\n2'.unescapeHTML());
|
||||
assertEqual('Pride & Prejudice', '<h1>Pride & Prejudice</h1>'.unescapeHTML());
|
||||
|
||||
benchmark(function(){
|
||||
largeTextEscaped.unescapeHTML();
|
||||
|
|
Loading…
Reference in New Issue