[Qt-interest] PHP's htmlentities in Qt

Karol Krizka kkrizka at gmail.com
Thu Jul 23 18:36:50 CEST 2009


Hi there,

I'm wondering if there is a function in Qt that is equivalent to PHP's
htmlentities [1] and html_entity_decode [2]. One basically turns all
special HTML characters into entities, and the other one reverses that.

The reason I am asking this is that I'm trying to save an HTML document
inside an XML file. The HTML document is some text and images that the
user will create, and the XML file is a global settings file that will
contain the said document. I need to encode the HTML special characters
(<,>,&) into something that will make it possible for me to reread the
entire document back from the XML file without any trouble.

--
Cheers,
Karol Krizka
http://www.krizka.net

[1] http://ch2.php.net/manual/en/function.htmlentities.php
[2] http://ch2.php.net/manual/en/function.html-entity-decode.php




More information about the Qt-interest-old mailing list