diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-02-09 20:13:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-09 20:13:11 +0100 |
commit | 016ad37bc8c9ca8bf8f872b8fee704a0388f575e (patch) | |
tree | fe0d5dac5073ca4bdd0fcb90518699f696473872 /config | |
parent | a666d1e7edaa8a3da61ce23f648321f7aa61d03b (diff) |
Fix URL linkifier grabbing full-width spaces and quotations (#9997)
Fix #9993 Fix #5654
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/twitter_regex.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/twitter_regex.rb b/config/initializers/twitter_regex.rb index 0e8f5bfeb..0ddbbee98 100644 --- a/config/initializers/twitter_regex.rb +++ b/config/initializers/twitter_regex.rb @@ -1,7 +1,7 @@ module Twitter class Regex - REGEXEN[:valid_general_url_path_chars] = /[^\p{White_Space}\(\)\?]/iou - REGEXEN[:valid_url_path_ending_chars] = /[^\p{White_Space}\(\)\?!\*';:=\,\.\$%\[\]~&\|@]|(?:#{REGEXEN[:valid_url_balanced_parens]})/iou + REGEXEN[:valid_general_url_path_chars] = /[^\p{White_Space}<>\(\)\?]/iou + REGEXEN[:valid_url_path_ending_chars] = /[^\p{White_Space}\(\)\?!\*"'「」<>;:=\,\.\$%\[\]~&\|@]|(?:#{REGEXEN[:valid_url_balanced_parens]})/iou REGEXEN[:valid_url_balanced_parens] = / \( (?: |