Should have been escape, no unescape

abstract-chosen
Matthew Beale 2011-07-27 12:11:24 -04:00
parent b23391b66d
commit 2013c524ca
2 changed files with 2 additions and 2 deletions

View File

@ -658,7 +658,7 @@
} }
div = new Element('div', { div = new Element('div', {
'style': style_block 'style': style_block
}).update(this.search_field.value.unescapeHTML()); }).update(this.search_field.value.escapeHTML());
document.body.appendChild(div); document.body.appendChild(div);
w = Element.measure(div, 'width') + 25; w = Element.measure(div, 'width') + 25;
div.remove(); div.remove();

View File

@ -555,7 +555,7 @@ class Chosen
for style in styles for style in styles
style_block += style + ":" + @search_field.getStyle(style) + ";" style_block += style + ":" + @search_field.getStyle(style) + ";"
div = new Element('div', { 'style' : style_block }).update(@search_field.value.unescapeHTML()) div = new Element('div', { 'style' : style_block }).update(@search_field.value.escapeHTML())
document.body.appendChild(div) document.body.appendChild(div)
w = Element.measure(div, 'width') + 25 w = Element.measure(div, 'width') + 25