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

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

parent c4511a12
......@@ -133,7 +133,7 @@ def replace_link_nodes_with_text(pattern)
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 @@ def replace_link_nodes_with_href(pattern)
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
......
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