Closed magnusviri closed 6 years ago
This is something I'm finding as well. I'm using the following in my recipe
<key>CATEGORY</key>
<string>Maths & Statistics</string>
This results in an error of:
not well-formed (invalid token): line 9, column 17 Failed.
Changing the Category tag to remove the ampersand allows the recipe to run successfully.
Interestingly I just noticed the following in the verbose output:
JSSImporter: Category type: category-'Maths '&' Statistics' already exists according to JSS, moving on...
JSSImporter: Category type: policy_category-'Maths '&' Statistics' already exists according to JSS, moving on...
The quoting seems to be off, although this may be how the error is presented.
@magnusviri Indeed, plists are a form of XML. I'm surprised that it doesn't work with the correct &
escaping.
I will investigate! I bet it's getting double encoded somewhere.
You'll definitely want to do so in a testing environment, but if you try out the beta release, I can't recreate this issue any longer.
Just to confirm, I created a recipe override for a JSS recipe and overrode the CATEGORY
to have a value that includes an ampersand, the literal text of the override reads:
<string>Productivity & Awesomeness</string>
This both uploaded and came back down as expected. Please let me know if your experience differs!
I cna confirm this is fixed in the beta. Many thanks.
Yes!
I don't know if this is a JSSImporter error or a autopkg error. When I use an ampersand in my group name I have to escape it in the plist file, but then I get this error:
It turns out that the plist is parsed as xml, I'm assuming in the xml template file. I need to escape my ampersand like this, "&".