From 81e1b5d9a6627e0461492b0c6e80c60e61cda2c4 Mon Sep 17 00:00:00 2001 From: xiaoyifang <105986+xiaoyifang@users.noreply.github.com> Date: Thu, 27 Apr 2023 07:52:48 +0800 Subject: [PATCH] fix: the implementation of unescapeutf8 is wrong fix the bug found in ref #579 --- src/common/htmlescape.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/htmlescape.cc b/src/common/htmlescape.cc index 0dcbdc57..ea1c231a 100644 --- a/src/common/htmlescape.cc +++ b/src/common/htmlescape.cc @@ -188,7 +188,7 @@ QString fromHtmlEscaped( QString const & str){ 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() ); } }