andrewplummer/Sugar — pull request #258 by hansede (2013-01-09 17:46:32+00:00)
Title: unescapeHTML() bug fix

unescapeHTML() unescapes two layers of escape codes that have been escaped multiple times. For example:

'&gt;'.unescapeHTML() == '>' // true
'>'.escapeHTML().unescapeHTML() != '>' // true

My change fixes this so that only one layer of HTML escaping is unescaped:

'&gt;'.unescapeHTML() == '>' // true
'>'.escapeHTML().unescapeHTML() == '>' // true