プロジェクト

全般

プロフィール

Vote #63394

完了

Inline code with less-then/greater-than produces @lt; and @gt; respectively

Admin Redmine さんが約3年前に追加. 約3年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Text formatting_26
対象バージョン:
開始日:
2008/06/10
期日:
進捗率:

0%

予定工数:
category_id:
26
version_id:
14
issue_org_id:
1416
author_id:
4
assigned_to_id:
0
comments:
10
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I tried to put the following in inline code


in a forum message and the result was <Location /redmine> e.g. @@

Is this expected? Looks like a bug to me.

  • Redmine-0.7.1
  • Rails-2.0.2
  • Ruby-1.8.6

journals

Ran into the same thing. Simple workaround is to stop the inline, add the </>, and continue the inline (ending it at the next </> and resuming it afterward).

(ampersand)abc <123> xyz(ampersand) results in @abc <123> xyz@

(ampersand)abc(ampersand) <(ampersand)123(ampersand)> (ampersand) xyz(ampersand) gives you @abc@ <@123@> @xyz@, which is what you want.
--------------------------------------------------------------------------------
Sorry -- "@" is not an (ampersand). Also, "add the ," should be "add the < or > characters," (if you follow a less than immediately by a greater than, redmine appears to not show it).
--------------------------------------------------------------------------------
The problem is redcloth parses twice these characters ; the first time it escapes all "<" and ">", no problem about that, but the second it traduces resulting "&amp;lt;" to "&amp;amp;lt;" (and so on), which is incorrect. It seems to me it's a redcloth problem, so I patched recloth lib to avoid second parsing. See attachment and let me know your opinion about that.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

This works fine for inline code with @ separators. For <pre> </pre> separators, this does not work.
Why not considering moving to RedCloth 4 that apparently fixes these 2 issues ?

--------------------------------------------------------------------------------

This works fine for inline code with @ separators. For @<@pre@> separators, this does not work.
Why not considering moving to RedCloth 4 that apparently fixes these 2 issues ?

--------------------------------------------------------------------------------
In fact, the bug I described (with pre separators) appears when I use coderay-0.9.1 (for java syntax coloration) that I have copied manually in redmine/vendor/plugins.
I attached a patch of redcloth3.rb that seems to work.

--------------------------------------------------------------------------------
Anthony Groyer wrote:
> In fact, the bug I described (with pre separators) appears when I use coderay-0.9.1 (for java syntax coloration) that I have copied manually in redmine/vendor/plugins.
> I attached a patch of redcloth3.rb that seems to work.

This patch solves the issue when the < and > are between a <pre><pre><code class="..."> </code></pre></pre> tags but create a bug when they are used in <pre><pre> </pre></pre> tags.
--------------------------------------------------------------------------------
The initial defect (< > inside inline code) is fixed by applying Jean-Baptiste's patch in r3567.
Anthony, your problem seems different and your patch breaks a few tests.
--------------------------------------------------------------------------------
I do have about the same problem with lines starting with a space
like this

<VLAN>
--------------------------------------------------------------------------------


related_issues

duplicates,Closed,2280,lesser symbol is printed as HTMLcode
duplicates,Closed,3020,Problem with wiki formatting for inline code with "@" characters
duplicates,Closed,2922,bad escaping of < and > in code exemple in redmine Wiki
duplicates,Closed,4794,wiki rendering bug

Admin Redmine さんが約3年前に更新

  • カテゴリText formatting_26 にセット
  • 対象バージョン1.0.0 (RC)_14 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0