DICT servers: ignore refs in html

This commit is contained in:
Nikolay Korotkiy 2021-01-15 12:47:18 +03:00
parent c6f8d29a5a
commit 73ec1b5950
No known key found for this signature in database
GPG key ID: D1DE6D7F693663A5

View file

@ -833,8 +833,10 @@ void DictServerArticleRequest::run()
else else
articleStr = Html::preformat( articleText.toUtf8().data() ); articleStr = Html::preformat( articleText.toUtf8().data() );
articleText = QString::fromUtf8( articleStr.c_str(), articleStr.size() ) articleText = QString::fromUtf8( articleStr.c_str(), articleStr.size() );
.replace(refs, "<a href=\"gdlookup://localhost/\\1\">\\1</a>" ); if( !contentInHtml )
{
articleText = articleText.replace(refs, "<a href=\"gdlookup://localhost/\\1\">\\1</a>" );
pos = 0; pos = 0;
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) #if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
@ -919,6 +921,7 @@ void DictServerArticleRequest::run()
pos += 30; pos += 30;
} }
#endif #endif
}
articleData += string( "<div class=\"dictd_article\">" ) articleData += string( "<div class=\"dictd_article\">" )
+ articleText.toUtf8().data() + articleText.toUtf8().data()