opt:website tag regex expression refine

This commit is contained in:
Xiao YiFang 2022-07-17 18:22:39 +08:00
parent dd244e0336
commit 2298fa2a3d

View file

@ -54,7 +54,7 @@ void IframeSchemeHandler::requestStarted(QWebEngineUrlRequestJob *requestJob)
// remove existed base tag // remove existed base tag
articleString.remove( baseTag ) ; articleString.remove( baseTag ) ;
QRegularExpression headTag( "<head\\s+.*?>", QRegularExpression headTag( "<head\\b.*?>",
QRegularExpression::CaseInsensitiveOption QRegularExpression::CaseInsensitiveOption
| QRegularExpression::DotMatchesEverythingOption ); | QRegularExpression::DotMatchesEverythingOption );
auto match = headTag.match( articleString, 0 ); auto match = headTag.match( articleString, 0 );