diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 748a1d7e..113b1d39 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -93,7 +93,9 @@ module ApplicationHelper end def textilizable(text) - (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? RedCloth.new(h(text)).to_html : simple_format(auto_link(h(text))) + text = (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? RedCloth.new(h(text)).to_html : simple_format(auto_link(h(text))) + # turn "#id" patterns into links to issues + text = text.gsub(/#(\d+)([^;\d])/, "#\\1\\2") end def error_messages_for(object_name, options = {})