App skeleton generator generates faulty info.xml when using characters like '&, <,'. Parser errors #1505
Open
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Go to https://apps.nextcloud.com/developer/apps/generate and fill in some dummy data.
- Add one or more of the following characters inside the summary and/or description field(s): &, <
- Generate and download the app.
xmllint
the appinfo/info.xml file:xmllint appinfo/info.xml
- Observe the parser errors:
helloworld/appinfo/info.xml:6: parser error : xmlParseEntityRef: no name
<summary>Test & test.</summary>
Expected behaviour
The app generator should generate an info.xml file that does not contain parser errors, regardless of what users fill in the app generator's fields.
Actual behaviour
The info.xml file throws parser errors when using 'illegal' characters. And because of the parser errors, Nextcloud cannot read the info.xml file correctly.
helloworld/appinfo/info.xml:6: parser error : xmlParseEntityRef: no name
<summary>Test & test.</summary>
Potential fix(es)
- Someone in the community chat suggested to wrap the summary and description inputs with
CDATA
. - Escape illegal characters. Stackoverflow: What characters do I need to escape in XML documents?