diff options
Diffstat (limited to 'lib/banzai/filter/autolink_filter.rb')
-rw-r--r-- | lib/banzai/filter/autolink_filter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/filter/autolink_filter.rb b/lib/banzai/filter/autolink_filter.rb index 4723bfbf261..0aa1ee8f604 100644 --- a/lib/banzai/filter/autolink_filter.rb +++ b/lib/banzai/filter/autolink_filter.rb @@ -86,7 +86,7 @@ module Banzai # outside the link element. The entity must be marked HTML safe in # order to be output literally rather than escaped. match.gsub!(/((?:&[\w#]+;)+)\z/, '') - dropped = ($1 || '').html_safe + dropped = (Regexp.last_match(1) || '').html_safe # To match the behaviour of Rinku, if the matched link ends with a # closing part of a matched pair of punctuation, we remove that trailing |