[Development] QString::toHtmlEscaped()

Robin Burchell robin+qt at viroteck.net
Wed Jan 18 21:07:39 CET 2012


Hi,

Thanks for following this up from Gerrit!

On Wed, Jan 18, 2012 at 9:52 PM,  <kranthi.kumar-kuntala at nokia.com> wrote:
> I was looking at toHtmlEscaped() method in QString class which converts
> metacharacters <, >, &, and " replaced by HTML entities.
> is there any other method which can replace other metacharacters for example
> (: , =  ) etc ?

My personal feeling is that toHtmlEscaped should do this. It does sort
of imply that already, after all. It probably isn't even all that
difficult to do. One thing I'm not sure about is what the impact on
e.g. QWidget (and other things that use similar tricks) will be: will
they display escaped entities correctly? Anyone on list happen to know
the answer to that?

> Also is there a method which will do the other way round eg:
> fromHtmlEscaped() ?

I think having one would be handy, myself. +1



More information about the Development mailing list