PDA

View Full Version : Encode html special characters



miraks
20th September 2009, 09:59
Hello,

I am looking a way to encode a string in html.

Do you know how to do that in QT ?

miraks
20th September 2009, 19:56
Nobody knows ! It seems simple !

Lykurg
21st September 2009, 07:31
I don't know such a function, but you can do 5 simple string replacements your own...

miraks
21st September 2009, 07:45
Which ones ?

Lykurg
21st September 2009, 08:51
Which ones ?

use google, but you can start with "<" and ">"...

EDIT: Because I'm nice:

* '&' (ampersand) becomes '&amp;'
* '"' (double quote) becomes '&quot;'
* ''' (single quote) becomes '&#039;''
* '<' (less than) becomes '&lt;'
* '>' (greater than) becomes '&gt;'