decodeAll
relies on
Ox.normalizeHTML
, which uses the DOM and may transform
the string
> Ox.decodeHTMLEntities('<'&">')
'<\'&">'
> Ox.decodeHTMLEntities('<'&">')
'<\'&">'
> Ox.decodeHTMLEntities('äbçdê')
'äbçdê'
> Ox.decodeHTMLEntities('äbçdê')
'äbçdê'
> Ox.decodeHTMLEntities('äbçdê', true)
'äbçdê'
> Ox.decodeHTMLEntities('β')
'β'
> Ox.decodeHTMLEntities('β', true)
'β'
> Ox.decodeHTMLEntities('<b>')
''
@*/
Ox.decodeHTMLEntities = function(string, decodeAll) {
return decodeAll
? Ox.decodeHTMLEntities(Ox.normalizeHTML(string))
: String(string)
.replace(replace.namedEntity[0], replace.namedEntity[1])
.replace(replace.numericEntity[0], replace.numericEntity[1]);
};
/*@
Ox.highlightHTML bar
baz', 'foobar', 'c', true) 'foobar
baz' > Ox.highlightHTML('foo