mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Merge branch 'simonwiles-data_uris'
This commit is contained in:
commit
5ebacacc63
|
@ -336,7 +336,7 @@ string StardictDictionary::handleResource( char type, char const * resource, siz
|
||||||
string articleText = "<div class=\"sdct_h\">" + string( resource, size ) + "</div>";
|
string articleText = "<div class=\"sdct_h\">" + string( resource, size ) + "</div>";
|
||||||
|
|
||||||
return ( QString::fromUtf8( articleText.c_str() )
|
return ( QString::fromUtf8( articleText.c_str() )
|
||||||
.replace( QRegExp( "(<\\s*img\\s+[^>]*src\\s*=\\s*[\"']*)([^\"']*)", Qt::CaseInsensitive ),
|
.replace( QRegExp( "(<\\s*img\\s+[^>]*src\\s*=\\s*[\"']+)((?!data:)[^\"']*)", Qt::CaseInsensitive ),
|
||||||
"\\1bres://" + QString::fromStdString( getId() ) + "/\\2" )
|
"\\1bres://" + QString::fromStdString( getId() ) + "/\\2" )
|
||||||
.toUtf8().data() );
|
.toUtf8().data() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue