Backport Ruby-1.9 html_escape functionality