Project

General

Profile

Defect #1189

Many macro shows raw html text

Added by Mickael G over 6 years ago. Updated over 6 years ago.

Status:
新規(New)
Priority:
通常(Normal)
Assignee:
-
Category:
-
Target version:
-
Start date:
02/25/2013
Due date:
% Done:

0%

Estimated time:

Description

for : div_start_tag()


module WikiExtensionsWikiMacro
  Redmine::WikiFormatting::Macros.register do
    desc "Displays a <pre><div id=" + '"id_name"' + " class=" + '"' + 'class_name' + '"></pre>' + "\n\n" +
      " !{{div_start_tag(id_name)}}" + "'\n" +
      " !{{div_start_tag(id_name, class_name)}}" 
    macro :div_start_tag do |obj, args|
      return ('</p><div><p>').html_safe if args.length == 0
      return ('</p><div id="' + args[0].strip + '"><p>').html_safe if args.length == 1
      return ('</p><div id="' + args[0].strip + '" class="' + args[1].strip + '"><p>').html_safe
    end
  end
end

module WikiExtensionsWikiMacro
  Redmine::WikiFormatting::Macros.register do
    desc "Displays a <pre></div></pre>\n\n" +
      "  !{{div_end_tag}}" 
    macro :div_end_tag do |obj, args|
      return ('</p></div><p>').html_safe
    end
  end
end

seem to be bugged on other tag...

History

#1

Updated by Mickael G over 6 years ago

link with : #1175

check output with .html_safe

Also available in: Atom PDF