Handle escaped html for plain text output

Always unescape html for plain text output no matter what the input is.
This commit is contained in:
James Graham
2023-04-09 14:20:22 +00:00
parent 7bb7dd7bbb
commit 4341cc437d
2 changed files with 17 additions and 9 deletions

View File

@@ -235,9 +235,7 @@ QString TextHandler::handleRecievePlainText(Qt::TextFormat inputFormat, const bo
// Escaping then unescaping allows < and > to be maintained in a plain text string
// otherwise markdownToHTML will strip what it thinks is a bad html tag entirely.
if (inputFormat == Qt::PlainText) {
outputString = unescapeHtml(outputString);
}
outputString = unescapeHtml(outputString);
outputString = outputString.trimmed();
return outputString;