Uploaded image for project: 'Confluence'
  1. Confluence
  2. CONFLUENCE-487

Extraneous empty line after the beginning of a link containing a macro

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 9.88.0
    • 9.87.3
    • Syntax - XHTML
    • None
    • Unknown

    Description

      The following Confluence XHTML: 

      <div>
          <a href="https://perdu.com">
            <ac:structured-macro ac:name="random-macro">
              <ac:parameter ac:name="param">value</ac:parameter>
            </ac:structured-macro>
          </a>
      </div>
      

      Produces the following events (which seems correct except the onMacroStandalone, which is supposed to be a onMacroInline):

      beginDocument
      beginGroup
      beginParagraph
      beginLink [Typed = [true] Type = [url] Reference = [https://perdu.com]] [false] [[shape]=[rect]]
      onMacroStandalone [random-macro] [param=value]
      endLink [Typed = [true] Type = [url] Reference = [https://perdu.com]] [false] [[shape]=[rect]]
      endParagraph
      endGroup
      endDocument
       

      This leads to the following, which confuses XWiki's WYSIWYG editor:

      (((
      [[
      
      {{random-macro param="value"/}}>>url:https://perdu.com||shape="rect"]]
      )))
      

      Expected:

      (((
      [[{{random-macro param="value"/}}>>url:https://perdu.com||shape="rect"]]
      )))
      

      This seems to be because the beginning of a paragraph is enforced inside the link, although the link is already in a paragraph.

      Attachments

        Activity

          People

            rjakse Raphaël Jakse
            rjakse Raphaël Jakse
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: