Unescaping HTML text in Qt/QML
-
wrote on 25 Aug 2011, 14:40 last edited by
Hi
I have some QML Text objects which contain HTML escaped text. How can I obtain the plain, unformatted version of this text? Looking really for the opposite of Qt.escape().
I have tried creating a QTextDocument, setting the escaped text with setHtml, then calling toPlainText(). This successfully removes HTML tags however, escaped text such as & ldquo; gets replaced with ?s.
-
wrote on 25 Aug 2011, 14:59 last edited by
QML supports JavaScript regular expressions. You can try with them.
2/2