I want to convert entity character(Escape character) to HTML in QT, please help me....
i.e: I want to replace " with ", > with >
=====This is my code that not worked====
QString MyApp::ReplaceString(const QString Data, const QString &Before, const QString &After) { QString Result = Data; Result.replace(Before, After, Qt::CaseInsensitive); return Result; } ========
QTextCodec *codec = QTextCodec::codecForName("UTF-8"); QByteArray data=pReply->readAll(); QString str = codec->toUnicode((const char *)data); str = Qt::escape(str); str = ReplaceString(str, """, "\""); str = ReplaceString(str,">", ">");
escapeing your input?