prototype: Refactor String#escapeHTML to avoid using the with statement.

This commit is contained in:
Tobie Langel 2008-03-16 19:08:34 +00:00
parent c01cb850c1
commit 6bae548e0a
2 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,5 @@
* Refactor String#escapeHTML to avoid using the `with` statement. [Tobie Langel]
* Remove usage of the `with` statement from unit tests. [Tobie Langel]
* Complete rewrite of the deprecation helper, now renamed UpdateHelper and useable by third-party libs. [Tobie Langel]

View File

@ -228,7 +228,7 @@ Object.extend(String.prototype.escapeHTML, {
text: document.createTextNode('')
});
with (String.prototype.escapeHTML) div.appendChild(text);
String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);
var Template = Class.create({
initialize: function(template, pattern) {