diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-01-20 20:04:15 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-01-20 20:04:15 +0100 |
commit | 7d347ae564c137bd8b133dd4d589b089bde931a5 (patch) | |
tree | 2004517d9c80fbd95359d2bd53842fa031415a72 /lib | |
parent | 6000f8545f43b449035cb50382901ce40fb807b0 (diff) | |
parent | a8a65afe1e953ce3a9fc151f9e033b99fc568fad (diff) | |
download | gitlab-ce-7d347ae564c137bd8b133dd4d589b089bde931a5.tar.gz |
Merge branch 'master' into issue_3945
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/reference_filter.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/banzai/filter/reference_filter.rb b/lib/banzai/filter/reference_filter.rb index 20bd4f7ee6e..3637b1bac94 100644 --- a/lib/banzai/filter/reference_filter.rb +++ b/lib/banzai/filter/reference_filter.rb @@ -133,6 +133,7 @@ module Banzai next unless link && text link = CGI.unescape(link) + next unless link.force_encoding('UTF-8').valid_encoding? # Ignore ending punctionation like periods or commas next unless link == text && text =~ /\A#{pattern}/ @@ -170,6 +171,7 @@ module Banzai next unless link && text link = CGI.unescape(link) + next unless link.force_encoding('UTF-8').valid_encoding? next unless link && link =~ /\A#{pattern}\z/ html = yield link, text |