This issue has been created
There is 1 update.
 
 
XWiki Rendering / cid:jira-generated-image-avatar-bc043512-4149-4d45-9e5f-c146d3082e39 XRENDERING-785 Open

Line breaks at the end of block elements should be escaped

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-6726fb3c-bf91-401d-8138-aa236c7f02c9 Raphaël Jakse created this issue on 12/May/25 10:13
 
Summary: Line breaks at the end of block elements should be escaped
Issue Type: cid:jira-generated-image-avatar-bc043512-4149-4d45-9e5f-c146d3082e39 Bug
Affects Versions: 16.10.7, 17.0.0
Assignee: Unassigned
Components: Syntax - xwiki/2.1
Created: 12/May/25 10:13
Priority: cid:jira-generated-image-static-major-4141c3aa-4c10-4f6b-a62c-300f00747549 Major
Reporter: Raphaël Jakse
Description:

Hi! The following (Confluence) XHTML syntax:

<h1>Title<br /></h1>

Leads to the following XWiki syntax:

= {{id name="MySpaceHome-Title"/}}Title
 =

Which produces two titles (the second one is empty). These events are generated:

```
beginHeader [1, HTitle]
onWord [Title]
onNewLine
endHeader [1, HTitle]
```

Which seems correct. It looks like the line break inside the heading should be escaped.

See also a likely related issue reported at https://forum.xwiki.org/t/table-breaks-when-converting-from-html/16859/2 where, with the HTML syntax, if a line break is at the end of a table cell, the rendering of the table breaks in a similar way.

 
 

1 update

 
cid:jira-generated-image-avatar-6726fb3c-bf91-401d-8138-aa236c7f02c9 Changes by Raphaël Jakse on 12/May/25 10:14
 
Description: Hi! The following (Confluence) XHTML syntax:

{code}
<h1>Title<br /></h1>
{code}

Leads to the following XWiki syntax:

{code}
= {{id name="MySpaceHome-Title"/}}Title
=
{code}

Which produces two titles (the second one is empty). These events are generated:

``` {code}
beginHeader [1, HTitle]
onWord [Title]
onNewLine
endHeader [1, HTitle]
``` {code}

Which seems correct. It looks like the line break inside the heading should be escaped.

See also a likely related issue reported at https://forum.xwiki.org/t/table-breaks-when-converting-from-html/16859/2 where, with the HTML syntax, if a line break is at the end of a table cell, the rendering of the table breaks in a similar way.