Fix #9963 reference_filter "Encoding::CompatibilityError" bug with some complex URL;

This commit is contained in:
Jason Lee
2016-01-12 18:19:55 +08:00
parent c4511a1234
commit 41bcab118a
+2 -2
View File
@@ -133,7 +133,7 @@ module Banzai
next unless link && text
link = URI.decode(link)
link = CGI.unescape(link)
# Ignore ending punctionation like periods or commas
next unless link == text && text =~ /\A#{pattern}/
@@ -170,7 +170,7 @@ module Banzai
text = node.text
next unless link && text
link = URI.decode(link)
link = CGI.unescape(link)
next unless link && link =~ /\A#{pattern}\z/
html = yield link, text