Defect #7375

<pre> ... </pre> doesn't escape wiki syntax correctly

Added by Michele d'Amico almost 9 years ago. Updated almost 8 years ago.

Status:ClosedStart date:2011-01-19
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Text formatting
Target version:-
Resolution:Duplicate Affected version:

Description

Try this wiki code (see http://demo.redmine.org/projects/testcode/wiki/Wiki):

  
does really escape?
<code class="ruby">
# The Greeter class
class Greeter
  def initialize(name)
    @name = name.capitalize
  end

  def salute
    puts "Hello #{@name}!" 
  end
end
</code>

I think that the pre tag blocks should escape the wiki syntax at all without "see" any wiki code like tags

example_7375.text (229 Bytes) Michele d'Amico, 2011-01-24 10:41


Related issues

Related to Redmine - Defect #8395: Tags start with 'pre' are handled as 'pre' tag in Textile Closed 2011-05-18
Duplicates Redmine - Defect #4472: Escape <code> tag New 2009-12-22

History

#1 Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

The "does really escape?" string is not inside a pre tag.
Past your example in a simple html page and see how firefox renders it.

#2 Updated by Michele d'Amico over 8 years ago

I'm sorry, maybe the body of my bug is affected to that bug to:

I've attached the wiki text that I wrote in the body and I think it should become like this where pode is replaced by code:

<pode java>

does really escape?

# The Greeter class
class Greeter
  def initialize(name)
    @name = name.capitalize
  end

  def salute
    puts "Hello #{@name}!" 
  end
end

I know that pre tag block is a wiki to html escape, but I think a wiki to simple text escape could be useful too (something like {{nowiki}}, {{nowiki_end}} macros).

I found that issue while writing a dokuwiki to redmine's wiki translator and maybe that is a very rare case; if you think that is not a bug or it is how redmine's wiki should work close it and please forgive me for the noise.

Just a question: how can I write <pode> where pode is replaced by code with redmine's wiki engine?

Regards

--Michele

#3 Updated by Toshi MARUYAMA over 8 years ago

  • Category set to Text formatting

#4 Updated by David Raison about 8 years ago

Any developments on this?
In my case I'm trying to display xml containing a <kode> (:s/k/c/) tag inside a

<pre></pre>
blog.

#5 Updated by David Raison about 8 years ago

I found that by doubling the tags, i.e. using <code>728</code> I can show at least one pair.

#6 Updated by Etienne Massip almost 8 years ago

  • Status changed from Reopened to Closed
  • Resolution changed from Invalid to Duplicate

Dupe of #4472.

Also available in: Atom PDF