fix: forbidden window.location on website dictionary

This commit is contained in:
YiFang Xiao 2023-07-13 11:50:20 +08:00 committed by xiaoyifang
parent 2ed7990531
commit 499ac3c54c

View file

@ -74,6 +74,7 @@ void IframeSchemeHandler::requestStarted(QWebEngineUrlRequestJob *requestJob)
// remove existed base tag // remove existed base tag
articleString.remove( baseTag ); articleString.remove( baseTag );
articleString.replace( "window.location", "window.location1" );
QRegularExpression headTag( R"(<head\b.*?>)", QRegularExpression headTag( R"(<head\b.*?>)",
QRegularExpression::CaseInsensitiveOption QRegularExpression::CaseInsensitiveOption