Uploaded image for project: 'SVG Macro'
  1. SVG Macro
  2. SVGMACRO-4

xwiki is stripping the xlink: part of a link when rendering

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 1.4
    • None
    • running on windows 2008 R2, tomcat V8, mysql 6, jvm 1.8.0_65-b17
    • Unknown

    Description

      when rendering an svg, xwiki breaks the links. For example, if you enter the followin into a page

      {{svg width="640" height="480"}}
      <svg width="640" height="480" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
       <g>
        <title>Layer 1</title>
        <rect height="153" width="339" y="178.1" x="230.599" transform="rotate(-21.642900466918945 400.0989990234375,254.60000610351562) " stroke-width="5" stroke="#000000" fill="#aa0000" id="svg_1"/>
        <a id="svg_3" xlink:href="http://www.ggogle.com">
         <text xml:space="preserve" y="242.1" x="374.6" transform="rotate(-21.893699645996094 401.59375000000006,244.17968749999997) matrix(1,0,0,1,27,10) " text-anchor="middle" stroke-width="0" stroke="#000000" fill="#000000" font-size="24" font-family="serif" id="svg_2">This is an SVG Drawing</text>
        </a>
       </g>
      </svg>
      {{/svg}}
      

      and display it, then look at the page source, it gets converted to this:

      <p><svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="480" width="640">
       <g>
        <title>Layer 1</title>
        <rect fill="#aa0000" height="153" id="svg_1" stroke="#000000" stroke-width="5" transform="rotate(-21.6429 400.099 254.6)" width="339" x="230.599" y="178.1"></rect>
        <a id="svg_3" href="http://www.google.com">
         <text fill="#000000" font-family="serif" font-size="24" id="svg_2" stroke="#000000" stroke-width="0" text-anchor="middle" transform="rotate(-21.8937 401.6 244.51) matrix(1 0 0 1 27 10)" x="374.6" space="preserve" y="242.1">This is an SVG Drawing</text>
        </a>
       </g>
      </svg></p>
      

      as you can see, the href has lost its "xlink:" part. Internet Explorer doesn't seem to mind, but Chrome does, and you can't click on the link.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dullfig Daniel Ullfig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: