redmine支持html标签

redmine中的wiki默认禁掉了html标签的支持,可能是安全考虑吧,开启的方法也很简单:

将lib/redmine/wiki_formatting/markdown/formatter.rb 文件的122行改为false

        def formatter
120 
          @@formatter ||= Redcarpet::Markdown.new(
121 
            Redmine::WikiFormatting::Markdown::HTML.new(
122 
              :filter_html => true,
123 
              :hard_wrap => true
124 
            ),
125 
            :autolink => true,
126 
            :fenced_code_blocks => true,
127 
            :space_after_headers => true,
128 
            :tables => true,
129 
            :strikethrough => true,
130 
            :superscript => true,
131 
            :no_intra_emphasis => true
132 
          )

相关资料:

http://www.redmine.org/projects/redmine/wiki/RedmineTextFormattingMarkdown
http://www.redmine.org/issues/15520#note-16

http://www.redmine.org/projects/redmine/repository/revisions/14449/entry/trunk/lib/redmine/wiki_formatting/markdown/formatter.rb#L122

你可能感兴趣的:(redmine)