Skip to content

Commit

Permalink
src/notecontent.cpp:
Browse files Browse the repository at this point in the history
  In HtmlContent::setHtml non-ASCII characters of the
  html content are converted into HTML/XML-style decimal
  numeric character references.
  • Loading branch information
Amir Pakdel authored and Amir Pakdel committed May 10, 2011
1 parent f9c81cc commit 125be15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/notecontent.cpp
Expand Up @@ -1139,6 +1139,10 @@ QString HtmlContent::messageWhenOpening(OpenMessage where)
void HtmlContent::setHtml(const QString &html, bool lazyLoad)
{
m_html = html;
QRegExp rx("([^\\x00-\\x7f])");
while (m_html.contains(rx)) {
m_html.replace( rx.cap().unicode()[0], QString("&#%1;").arg(rx.cap().unicode()[0].unicode()) );
}
m_textEquivalent = toText(""); //OPTIM_FILTER
if (!lazyLoad)
finishLazyLoad();
Expand Down

0 comments on commit 125be15

Please sign in to comment.