There are 10 updates, 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-8d8e05ba-bf29-422d-a7b6-f60fa9dc345f XWIKI-22326 Closed

"newline" special character in page name breaks the navigation tree

 
View issue   ยท   Add comment
 

10 updates

 
cid:jira-generated-image-avatar-b2843d4e-7352-4ef7-ad7e-309484d9fcf8 Changes by Marius Dumitru Florea on 01/Aug/24 15:22
 
Fix Version: 16.4.2
Fix Version: 16.7.0-rc-1
Fix Version: 15.10.12
Difficulty: Unknown Easy
Documentation in Release Notes: N/A
Documentation: N/A
Assignee: Marius Dumitru Florea
Resolution: Fixed
Labels: bugfixingday
Status: Open Closed
 
 

2 comments

 
cid:jira-generated-image-avatar-b2843d4e-7352-4ef7-ad7e-309484d9fcf8 Marius Dumitru Florea on 01/Aug/24 15:25
 

Ilie Andriuta to reproduce and test you can also simply put a link like this in an existing page:

[[link to page with new line>>Parent.Chi
ld.WebHome]]

and create the child page from the missing page link.

 
cid:jira-generated-image-avatar-b2843d4e-7352-4ef7-ad7e-309484d9fcf8 Marius Dumitru Florea on 01/Aug/24 15:30
 

page names are used as HTML IDs of navigation trees items without any escaping which is breaking jstree

There is escaping, otherwise the tree wouldn't be usable at all because all document references contain special CSS characters (like : and .). The problem is that jsTree performs its own custom CSS escaping based on a regular expression, instead of using CSS.escape(), and this custom code doesn't handle correctly the new line character.