sanitize URL with full unicode to support chinese too
This commit is contained in:
parent
3a97d5880c
commit
009aa73a89
@ -157,7 +157,8 @@ QString NetworkFactory::networkErrorText(QNetworkReply::NetworkError error_code)
|
||||
}
|
||||
|
||||
QString NetworkFactory::sanitizeUrl(const QString& url) {
|
||||
static QRegularExpression reg_non_url(QSL("[^\\w\\-.~:\\/?#\\[\\]@!$&'()*+,;=% \\|]"));
|
||||
static QRegularExpression reg_non_url(QSL("[^\\w\\-.~:\\/?#\\[\\]@!$&'()*+,;=% \\|]"),
|
||||
QRegularExpression::PatternOption::UseUnicodePropertiesOption);
|
||||
|
||||
return QString(url).replace(reg_non_url, {});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user