From b1b89ff0ac854d88bff6409fda784191060b18d3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 17 Jun 2018 05:57:39 +0000 Subject: "attachment:filename" link syntax would not work if the file name contains "@" (#26507). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17393 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb index 9a2de5cff..412d0f434 100644 --- a/lib/redmine/wiki_formatting.rb +++ b/lib/redmine/wiki_formatting.rb @@ -180,6 +180,10 @@ module Redmine html.gsub!(%r{\buser:(.*?)<\/a>}) do "user:#{$2}" end + # restore attachments links with @ in file name eg. [attachment:image@2x.png] + html.gsub!(%r{\battachment:(.*?)}) do + "attachment:#{$2}" + end html end end -- cgit v1.2.3