I have Googled my brains out and can\'t figure out how to make this work. Here is what I\'m trying to do:
HTML:
"Hi, my n
To quote bobince
When you ask the browser for an element node's innerHTML, it doesn't give you the original HTML source that was parsed to produce that node, because it no longer has that information. Instead, it generates new HTML from the data stored in the DOM. The browser decides on how to format that HTML serialisation; different browsers produce different HTML, and chances are it won't be the same way you formatted it originally.
In summary: innerHTML/innerText/text/textContent/nodeValue/indexOf
, none of them will give you the unparsed text.
The only possible way to do this is with regex, or you can do an ajax post to the page itself, but that is a bad practice.