nasa / fpp

F Prime Prime: A modeling language for F Prime
https://fprime.jpl.nasa.gov
Apache License 2.0
41 stars 31 forks source link

[fpp-to-xml] Escape special characters in XML attributes #457

Closed bocchino closed 3 weeks ago

bocchino commented 3 weeks ago

XML attributes may not include the character <. We should replace it with &lt;. Several other characters are also not allowed in attributes. They are listed below.

timcanham commented 3 weeks ago

Additional comment: While the XML autocoders are still in the mix, all the disallowed XML tokens should be replaced in the format specifiers.

They include: >,<, &, ",'

bocchino commented 3 weeks ago

Good to know! Do you know what the replacements are? Currently we are replacing < as &lt; and " as &quot;.

bocchino commented 3 weeks ago

It looks like there may be an answer here: https://stackoverflow.com/questions/5709232/how-do-i-include-etc-in-xml-attribute-values.

timcanham commented 3 weeks ago

That's the set!