[TD]fix single quote in anno string list

This commit is contained in:
wandererfan
2020-04-04 20:33:37 -04:00
committed by WandererFan
parent 57cde015f7
commit da92b8c242

View File

@@ -37,6 +37,9 @@
#include <sstream>
#endif
#include <string>
#include <regex>
#include <qmath.h>
#include <QTextDocument>
#include <QTextBlock>
@@ -155,7 +158,10 @@ void QGIViewAnnotation::drawAnnotation()
if (it != annoText.begin()) {
ss << "<br>";
}
ss << Base::Tools::escapedUnicodeToUtf8(*it);
std::string u8String = Base::Tools::escapedUnicodeToUtf8(*it);
// what madness turns \' into \\\\\'?
std::string apos = std::regex_replace((u8String), std::regex("\\\\\'"), "'");
ss << apos;
}
ss << "<br></p>\n</body>\n</html> ";