mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-26 21:16:06 +10:00
Fix #9963 reference_filter "Encoding::CompatibilityError" bug with some complex URL;
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user