Merge branch 'simonwiles-data_uris'

This commit is contained in:
Julian Depetris Chauvin 2012-04-02 18:12:29 -03:00
commit 5ebacacc63

View file

@ -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() );
} }