0

Possible Duplicate:
How to decode HTML Entities in C?
How can I decode HTML entities in C++?

I didn't see anything good on this, which means this could be a good topic.

I have written a quick escapeHTML function in C++ which will escape stuff which is cool, but how would I unescape it with C++ as well?

It really is the idea of looking for a &, followed by a "lt;", "gt;", "quot;", "amp;" and return the relevant data.

Does anyone have a version they created? If not I will create an efficient version of it.

Community
  • 1
  • 1
Fallenreaper
  • 10,222
  • 12
  • 66
  • 129
  • 2
    possible duplicate of [How to decode HTML Entities in C?](http://stackoverflow.com/questions/1082162/how-to-decode-html-entities-in-c), related question [So we've got our HTML escape functions that really work in a C++ manner, how to do unescape?](http://stackoverflow.com/questions/7976445/so-weve-got-our-html-escape-functions-that-really-work-in-a-c-manner-how-to) – sachleen Jan 22 '13 at 19:51
  • Thank you for the link, im looking at it now. – Fallenreaper Jan 22 '13 at 19:52
  • just noticed. :) Ill take a Look Sachleen – Fallenreaper Jan 22 '13 at 19:53
  • 1
    Note that JavaScript's [`window.unescape`](https://developer.mozilla.org/en-US/docs/DOM/window.unescape) function is *not* for unescaping HTML. – PleaseStand Jan 22 '13 at 19:54
  • It seems to me that your question is unrelated to JavaScript? – Bergi Jan 22 '13 at 20:05
  • Couldn't you take a look at chromiums v8 engines source code? – Moritz Roessler Jan 22 '13 at 20:11
  • i have some HTML code that will break my JSON object, so i am escaping it, and then when i unescape it, it seems to work. – Fallenreaper Jan 22 '13 at 20:32

0 Answers0