Commit 41bcab11 authored by Jason Lee's avatar Jason Lee

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

parent c4511a12
...@@ -133,7 +133,7 @@ module Banzai ...@@ -133,7 +133,7 @@ module Banzai
next unless link && text next unless link && text
link = URI.decode(link) link = CGI.unescape(link)
# Ignore ending punctionation like periods or commas # Ignore ending punctionation like periods or commas
next unless link == text && text =~ /\A#{pattern}/ next unless link == text && text =~ /\A#{pattern}/
...@@ -170,7 +170,7 @@ module Banzai ...@@ -170,7 +170,7 @@ module Banzai
text = node.text text = node.text
next unless link && text next unless link && text
link = URI.decode(link) link = CGI.unescape(link)
next unless link && link =~ /\A#{pattern}\z/ next unless link && link =~ /\A#{pattern}\z/
html = yield link, text html = yield link, text
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment