-
Type:
Suggestion
-
Resolution: Low Engagement
-
None
-
Component/s: Core - Content REST APIs
Issue summary
If you create a page using the REST call /rest/api/content and include a DOCTYPE declaration in the storage format, it will throw the following error.
"message": "Error parsing xhtml: Unrecognized XML directive; expected CDATA or comment ('<![CDATA[' or '<!--').\n at [row,col {unknown-source}]: [1,323]", "reason": "Bad Request", "statusCode": 400
Removing the DOCTYPE declaration allows the page to be created successfully.
Suggestion
Add a method to detect the DOCTYPE declaration if this is passed in the body.storage.value of a REST API call, and remove it so the request is successful.