dauxio / daux.io

Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.
https://daux.io/
MIT License
791 stars 195 forks source link

Xhtml tags are interpreted within confluence structured macro tags #372

Closed daijithegeek closed 1 year ago

daijithegeek commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Create a markdown documentation containing an xhtml tag within a warning box.

!!! danger "Use `<ViewLoader>` instead of sharing components across plugins"
    Sharing components across plugins is dangerous as they will be built with a version of React controlled in one plugin.

You'll get the following error:

Content: 
 139 |[...]
 140 | ]]></ac:plain-text-body></ac:structured-macro>
>141 | 
           ^                            [ FAIL ]

In Api.php line 76:

  Client error response                                                        
   [url] https://confuence.mycompany/rest/api/content/123456       
   [status code] 400                                                           
   [message] Error parsing xhtml: Unexpected EOF; was expecting a close tag f  
  or element <ac:parameter>                                                    
   at [row,col {unknown-source}]: [141,6]                           

Expected behavior The page is published to confluence; it contains a warning macro and the xhtml tag is displayed.

onigoetz commented 1 year ago

Fixed in https://github.com/dauxio/daux.io/releases/tag/0.22.0

However, Macro titles in confluence cannot contain HTML, any HTML will be escaped