Commit 3d59b3a7 authored by Nathan Haug's avatar Nathan Haug
Browse files

#254307 and #194654. Adding \ and | to accepted query strings in URLs validation.

parent 94fd7a5d
......@@ -661,7 +661,8 @@ function link_validate_url($text) {
$internal_pattern = "/^([a-z0-9_\-+\[\]]+)";
$directories = "(\/[a-z0-9_\-\.~+%=&,$'():;*@\[\]]*)*";
$query = "(\/?\?([?a-z0-9+_\-\.\/%=&,$'():;*@\[\]]*))";
// Yes, four backslashes == a single backslash.
$query = "(\/?\?([?a-z0-9+_|\-\.\/\\\\%=&,$'():;*@\[\]]*))";
$anchor = "(#[a-z0-9_\-\.~+%=&,$'():;*@\[\]]*)";
// The rest of the path for a standard URL.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment