when customizing the escapeHtml function, it seems to only replace the first instance that it finds, and leaves the rest.
I am actually hacking the function a little bit, because I have HTML that has already been encoded, and I want to strip the encoding and replace it with normal characters.
when customizing the escapeHtml function, it seems to only replace the first instance that it finds, and leaves the rest.
I am actually hacking the function a little bit, because I have HTML that has already been encoded, and I want to strip the encoding and replace it with normal characters.
For example, I am doing this:
So, I really want to replace "&" with the normal ampersand sign (&). If there is a better way to do this, please let me know.
The main issue I am posting here is regarding the lack of replacement of each entity; it only replaces the first instance,