Project

General

Profile

disable link-parsing for wiki-macro?

Added by Stefan Frank over 11 years ago

I'm currently writing a wiki-macro, that accepts an url as a parameter and writes url as a result (to embed an svg-file with a zoom&pan): The html renders fine, but redmine tries to parse the url inside if it is an external link, so:

                <svg height='800' width='106'
                  xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
                  <g>
                    <image x='0' y='0' height='800' width='600'  xlink:href='http://localhost:3000/attachments/download/1/my.svg'/>
                  </g>
                </svg>

is rendered into:

                <svg height='800' width='106'
                  xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
                  <g>
                    <image x="0" y="0" height="800" width="600" href="&lt;a class=&quot;external&quot; href=&quot;http://localhost:3000/attachments/download/1/my.svg&quot;&gt;http://localhost:3000/attachments/download/1/my.svg&lt;/a&gt;"></image>
                  </g>
                </svg>

which obviously does not work: Is there a way to disable the parsing?! Or a way to tell it inside the macro, that no further parsing is necessary?!


Replies (3)

RE: disable link-parsing for wiki-macro? - Added by Jean-Philippe Lang over 11 years ago

That's a problem indeed. I've just filled a defect for that (#11633) and will fix it for 2.1.0.

RE: disable link-parsing for wiki-macro? - Added by Jean-Philippe Lang over 11 years ago

Fixed in trunk. BTW, an interesting feature was also introduced for macros in 2.1.0.

RE: disable link-parsing for wiki-macro? - Added by Stefan Frank over 11 years ago

Yay! Great! Thx! And the interesting feature also solves my other macro-problem (newlines being replaced with <br /> in multiline-parmeters. Totally made my day!

    (1-3/3)