Commit a3ccfba6 authored by alexpott's avatar alexpott

Issue #2557021 by sasanikolic, tim.plunkett: Url Filter does not correctly...

Issue #2557021 by sasanikolic, tim.plunkett: Url Filter does not correctly recognise URL's with uppercase query arguments
parent ffeb4a7d
......@@ -515,8 +515,8 @@ function _filter_url($text, $filter) {
// 1. Allow =&# for empty URL parameters and other URL-join artifacts
$valid_url_ending_characters = '[\p{L}\p{M}\p{N}:_+~#=/]|(?:' . $valid_url_balanced_parens . ')';
$valid_url_query_chars = '[a-z0-9!?\*\'@\(\);:&=\+\$\/%#\[\]\-_\.,~|]';
$valid_url_query_ending_chars = '[a-z0-9_&=#\/]';
$valid_url_query_chars = '[a-zA-Z0-9!?\*\'@\(\);:&=\+\$\/%#\[\]\-_\.,~|]';
$valid_url_query_ending_chars = '[a-zA-Z0-9_&=#\/]';
//full path
//and allow @ in a url, but only in the middle. Catch things like http://example.com/@user/
......
......@@ -10,6 +10,9 @@ http://www.test.com
www.test.com
person@test.com
<code>www.test.com</code>
http://test.com/?search=test
http://test.com/?search=Test
http://test.com/?search=tesT
What about tags that don't exist <x>like x say www.test.com</x>? And what about tag <pooh>beginning www.test.com with p?</pooh>
......
......@@ -10,6 +10,9 @@ This is just a <a href="http://www.test.com">www.test.com</a>. paragraph with <a
<a href="http://www.test.com">www.test.com</a>
<a href="mailto:person@test.com">person@test.com</a>
<code>www.test.com</code>
<a href="http://test.com/?search=test">http://test.com/?search=test</a>
<a href="http://test.com/?search=Test">http://test.com/?search=Test</a>
<a href="http://test.com/?search=tesT">http://test.com/?search=tesT</a>
What about tags that don't exist <x>like x say <a href="http://www.test.com">www.test.com</a></x>? And what about tag <pooh>beginning <a href="http://www.test.com">www.test.com</a> with p?</pooh>
......
Markdown is supported
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