diff --git a/src/dict/stardict.cc b/src/dict/stardict.cc index 22a2d2aac..7b4d87d42 100644 --- a/src/dict/stardict.cc +++ b/src/dict/stardict.cc @@ -454,11 +454,9 @@ string StardictDictionary::handleResource( char type, char const * resource, siz QString articleText = QString( "
" ) + QString::fromUtf8( resource, size ) + "
"; QRegularExpression imgRe( R"((<\s*(?:img|script)\s+[^>]*src\s*=\s*["']?)(?!(?:data|https?|ftp):))", - QRegularExpression::CaseInsensitiveOption - | QRegularExpression::InvertedGreedinessOption ); + QRegularExpression::CaseInsensitiveOption ); QRegularExpression linkRe( R"((<\s*link\s+[^>]*href\s*=\s*["']?)(?!(?:data|https?|ftp):))", - QRegularExpression::CaseInsensitiveOption - | QRegularExpression::InvertedGreedinessOption ); + QRegularExpression::CaseInsensitiveOption ); articleText.replace( imgRe, "\\1bres://" + QString::fromStdString( getId() ) + "/" ) .replace( linkRe, "\\1bres://" + QString::fromStdString( getId() ) + "/" ); @@ -517,8 +515,7 @@ string StardictDictionary::handleResource( char type, char const * resource, siz QRegularExpression audioRe( R"(<\s*audio\s*src\s*=\s*(["']+)([^"']+)(["'])\s*>(.*))", QRegularExpression::CaseInsensitiveOption - | QRegularExpression::DotMatchesEverythingOption - | QRegularExpression::InvertedGreedinessOption ); + | QRegularExpression::DotMatchesEverythingOption ); pos = 0;