Handle doctype and other html/xml tags inside message - Qt
-
Hi all,
I have got an issue here.
I am creating a text message something like "Are you :) today?". Since this contains a smiley, i convert this message text to html get the smiley mapping and then display. But this has a problem. All the html tags are working in the message now. For e.g. if the message starts with "<!" characters which comments the whole text line in html is working and all those possible combinations.
What can i do to fix this issue. I just want to show the text message as typed by the user except when the smilies are present in the message.
-
You could use rich text documents for displaying such tags (but they will be interpreted as HTML tags):
http://qt-project.org/doc/qt-4.8/richtext-structure.html
For regexp in Qt try to search some examples.