Closed Chaos02 closed 1 month ago
Not escaping seems to work just fine, if you can ignore the linter.
All XML documents generated by my service are well-formed and valid, of course. In particular, the ampersand character in the line
<Path>cmd.exe /c "netsh.exe wlan add profile filename="%TEMP%\wifi.xml" user=all >>"%TEMP%\wifi.log" 2>&1"</Path>
is properly escaped. I assume that you view the autounattend.xml
file in a browser such as Chrome, which renders the text value of XML elements (rather than their source code):
This is not the actual XML document, however.
Actually, I pulled the examples out of vscode as I was adding the disk checking module from Windows. I DID make sure that that section is right so something else seems to be off. There we're unescaped ampersands everywhere in the file. It might have been copy pasted from the browser, don't remember but thanks for looking into it so quickly. In that case I would recommend displaying a hint next to the "view XML" button or rendering the XML on the website itself if possible (so not a "download link" to the raw file)
Hey, really love your project but the page generates invalid XML files by improperly escaping the Ampersand & character in many places.
Here are some examples of what I found:
needs to be
and
needs to be
aswell as anything written into
Is also escaped improperly. as a result the unattend.xml does not work.