[Qt-interest] PHP's htmlentities in Qt
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Thu Jul 23 21:56:33 CEST 2009
Take a look at QUrl::encode and QUrl::decode
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Karol Krizka
Sent: Thursday, July 23, 2009 9:37 AM
To: qt-interest
Subject: [Qt-interest] PHP's htmlentities in Qt
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
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list