fix: the implementation of unescapeutf8 is wrong

fix the bug found in ref #579
This commit is contained in:
xiaoyifang 2023-04-27 07:52:48 +08:00
parent 617589d09c
commit 81e1b5d9a6

View file

@ -188,7 +188,7 @@ QString fromHtmlEscaped( QString const & str){
string unescapeUtf8( const string &str, bool saveFormat ) string unescapeUtf8( const string &str, bool saveFormat )
{ {
return string( unescape( QString::fromUtf8( str.c_str(), str.size() ) ).toUtf8().data(), saveFormat ); return string( unescape( QString::fromStdString( str ), saveFormat ).toUtf8().data() );
} }
} }