diff options
author | Daniel King <northerner@users.noreply.github.com> | 2018-02-11 22:49:18 +0000 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-02-11 23:49:18 +0100 |
commit | 6ef3874b2eac79cc2b602de609793254b8d6c611 (patch) | |
tree | 41032cc4b49c7fb3c574e700dcedf7e32d3f1814 /config/initializers | |
parent | e20700fe8fa22562d3df10ad0361e65676a01231 (diff) |
Fix URLs incorrectly having trailing hyphen removed (#6465)
In cases where a URL has a trailing hyphen the FetchLinkCardService incorrectly removes the hyphen when it is parsed The hyphen is not a reserved character in the URI spec https://tools.ietf.org/html/rfc3986#section-2.2
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/twitter_regex.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/twitter_regex.rb b/config/initializers/twitter_regex.rb index e924fac22..7fa828300 100644 --- a/config/initializers/twitter_regex.rb +++ b/config/initializers/twitter_regex.rb @@ -2,7 +2,7 @@ module Twitter class Regex REGEXEN[:valid_general_url_path_chars] = /[^\p{White_Space}\(\)\?]/iou - REGEXEN[:valid_url_path_ending_chars] = /[^\p{White_Space}\(\)\?!\*';:=\,\.\$%\[\]\p{Pd}~&\|@]|(?:#{REGEXEN[:valid_url_balanced_parens]})/iou + REGEXEN[:valid_url_path_ending_chars] = /[^\p{White_Space}\(\)\?!\*';:=\,\.\$%\[\]~&\|@]|(?:#{REGEXEN[:valid_url_balanced_parens]})/iou REGEXEN[:valid_url_balanced_parens] = / \( (?: |