[Development] QString::toHtmlEscaped()

Robin Burchell robin+qt at viroteck.net
Thu Jan 19 14:16:29 CET 2012


Hi,

On Thu, Jan 19, 2012 at 11:02 AM,  <lars.knoll at nokia.com> wrote:
> Is there really any big value in having this? It feels wrong to have
> special handling for HTML in here. While it's one of the most prominent
> formats for rich text, there are so many other formats that would require
> different escaping and we certainly don't want to support them all. I can
> live with toHTMLEscaped(), since it cleans up a really messy part of the
> Qt 4 API, but I'm not sure I want to extend this a whole lot more.

Big value, well... as you mentioned, it's common. I've needed to write
code to do entity decoding in the past, I'm sure a lot of others have.
This was just yet another place where it cropped up. If you don't want
it in QString, I can agree with that, I don't feel strongly about the
issue - I just thought it may be nice to have a centralised version of
this, like we do with encoding, so that it's not something that needs
to be written multiple times.

Thanks for your feedback,

Robin



More information about the Development mailing list