mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Allow for # in fragments because some clients send matrix.to links like that
This commit is contained in:
parent
5de730830a
commit
164de9c21c
1 changed files with 3 additions and 1 deletions
|
@ -61,7 +61,9 @@ inline const QRegularExpression url_regex(
|
|||
general_unicode + ")*))";
|
||||
const auto query = R"(((?:[a-zA-Z0-9\-._~!$&'*+,;=:@/?\\{}]|)" + pct_enc +
|
||||
R"(|\((?-1)\)|\[(?-1)\]|)" + general_unicode + ")*)";
|
||||
const auto &fragment = query;
|
||||
// explicitly allow # in fragments because of matrix.to urls generated by some clients...
|
||||
const auto fragment = R"(((?:[a-zA-Z0-9\-._~!$&'*+,;=:@/?\\{}#]|)" + pct_enc +
|
||||
R"(|\((?-1)\)|\[(?-1)\]|)" + general_unicode + ")*)";
|
||||
return R"((?<!["'\w])(?>()" + protocol + "://" + "(?:" + userinfo + "@)?" + host +
|
||||
"(?::[0-9]+)?" + path +
|
||||
"?"
|
||||
|
|
Loading…
Reference in a new issue