Browse Source

Preserve plain text formatting

adaptive-webui-19844
Chocobo1 10 years ago
parent
commit
9d5cfbcda9
  1. 2
      src/core/utils/misc.cpp

2
src/core/utils/misc.cpp

@ -467,6 +467,8 @@ QString Utils::Misc::parseHtmlLinks(const QString &raw_text)
static QRegExp reNoScheme("<a\\s+href=\"(?!http(s?))([a-zA-Z0-9\\?%=&/_\\.-:#]+)\\s*\">"); static QRegExp reNoScheme("<a\\s+href=\"(?!http(s?))([a-zA-Z0-9\\?%=&/_\\.-:#]+)\\s*\">");
result.replace(reNoScheme, "<a href=\"http://\\1\">"); result.replace(reNoScheme, "<a href=\"http://\\1\">");
// to preserve plain text formatting
result = "<p style=\"white-space: pre-wrap;\">" + result + "</p>";
return result; return result;
} }

Loading…
Cancel
Save