diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 217dbc80d03..aa6d16c9c38 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -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/
diff --git a/core/modules/filter/tests/filter.url-input.txt b/core/modules/filter/tests/filter.url-input.txt
index 7b33af56ca9..92289dcfd16 100644
--- a/core/modules/filter/tests/filter.url-input.txt
+++ b/core/modules/filter/tests/filter.url-input.txt
@@ -10,6 +10,9 @@ http://www.test.com
www.test.com
person@test.com
www.test.com
+http://test.com/?search=test
+http://test.com/?search=Test
+http://test.com/?search=tesT
What about tags that don't exist like x say www.test.com? And what about tag beginning www.test.com with p?
diff --git a/core/modules/filter/tests/filter.url-output.txt b/core/modules/filter/tests/filter.url-output.txt
index 9cc50730886..814a4ed7176 100644
--- a/core/modules/filter/tests/filter.url-output.txt
+++ b/core/modules/filter/tests/filter.url-output.txt
@@ -10,6 +10,9 @@ This is just a www.test.com. paragraph with www.test.com
person@test.com
www.test.com
+http://test.com/?search=test
+http://test.com/?search=Test
+http://test.com/?search=tesT
What about tags that don't exist like x say www.test.com? And what about tag beginning www.test.com with p?