Issue #2557021 by sasanikolic, tim.plunkett: Url Filter does not correctly recognise URL's with uppercase query arguments

8.0.x
Alex Pott 2015-09-01 16:18:24 +01:00
parent ffeb4a7d20
commit a3ccfba6f7
3 changed files with 8 additions and 2 deletions

View File

@ -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/

View File

@ -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>

View File

@ -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>