Only allow specific protocols to avoid matching random stuff like fma:brotherhood.
This commit is contained in:
parent
f28ea1833a
commit
2ee7a064ca
@ -7,18 +7,25 @@ Linkify =
|
|||||||
@catchAll = ///
|
@catchAll = ///
|
||||||
\b
|
\b
|
||||||
(
|
(
|
||||||
[a-z][\w-]+: # URL protocol and colon
|
( # Allowed URL protocols and colon
|
||||||
|
https?
|
||||||
|
| ftps?
|
||||||
|
| about
|
||||||
|
| bitcoin
|
||||||
|
| git
|
||||||
|
| irc[s6]?
|
||||||
|
):
|
||||||
(
|
(
|
||||||
/{1,3} # 1-3 slashes
|
/{1,3} # 1-3 slashes
|
||||||
| # or
|
| # or
|
||||||
[a-z0-9%] # Single letter or digit or '%'
|
[a-z0-9%] # Single letter or digit or '%'
|
||||||
| # or
|
|
||||||
\?(dn|x[lts]|as|kt|mt|tr)= # Magnet parameters
|
|
||||||
)
|
)
|
||||||
| # or
|
| # or
|
||||||
www\d{0,3}[.] # "www.", "www1.", "www2." … "www999."
|
www\d{0,3}[.] # "www.", "www1.", "www2." … "www999."
|
||||||
| # or
|
| # or
|
||||||
[a-z0-9.\-]+[.][a-z]{2,4}/ # looks like domain name followed by a slash
|
[a-z0-9.\-]+[.][a-z]{2,4}/ # looks like domain name followed by a slash
|
||||||
|
| # or
|
||||||
|
magnet:\?(dn|x[lts]|as|kt|mt|tr)= # magnet protocol with its parameters
|
||||||
)
|
)
|
||||||
( # One or more:
|
( # One or more:
|
||||||
[^\s()<>]+ # Run of non-space, non-()<>
|
[^\s()<>]+ # Run of non-space, non-()<>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user