This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-02e1d126-be48-488d-b10b-e2debf4285e3 XWIKI-22856 Open

Generated REST URL invalid when the page name contains ;

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-efe9c279-efac-4a39-9963-bdbe3dbd7b0a Michael Hamann created this issue on 05/Feb/25 15:23
 
Summary: Generated REST URL invalid when the page name contains ;
Issue Type: cid:jira-generated-image-avatar-02e1d126-be48-488d-b10b-e2debf4285e3 Bug
Affects Versions: 14.10.19
Assignee: Unassigned
Attachments: image-2025-02-05-15-23-05-366.png
Components: REST
Created: 05/Feb/25 15:23
Priority: cid:jira-generated-image-static-major-12df3c7c-00c6-414d-b6e5-a6af95d67727 Major
Reporter: Michael Hamann
Description:

Steps to reproduce:

  1. Create a page named "Weird; Reference".
  2. Inspect the HTML and copy the value of the data-xwiki-rest-url attribute of the HTML element.
  3. Open the copied URL.

Expected result:

The document is returned by the REST API.

Actual result:

An error that the document isn't found is displayed.

This is because the URL in the attribute is /xwiki/rest/wikis/xwiki/spaces/Weird;%20Reference/pages/WebHome while it should be /xwiki/rest/wikis/xwiki/spaces/Weird%3B%20Reference/pages/WebHome/requiredRights.

When opening the correct URL, also all URLs in the XML are wrong apart from the self reference:

43316_image-2025-02-05-15-23-05-366.png