Fix invalid XML declaration in getConfigXML() (#71)#74
Open
fjallemark wants to merge 1 commit into
Open
Conversation
The XML config declaration used uppercase `<?XML` (not a valid XML declaration per W3C XML 1.0, and a reserved PI target) and a corrupted encoding name `UTF?8`. Correct both to a spec-compliant `<?xml version="1.0" encoding="UTF-8"?>` so the output parses with standards-compliant XML parsers without a client-side workaround. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
I would prefer that the XMLDecl would be fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the malformed XML declaration emitted by
getConfigXML()insoftware/esp-firmware/wifiHandling.cpp, reported in #71.The current declaration has two problems:
<?XML(uppercase) is not a valid XML declaration. Per W3C XML 1.0§2.8 the literal is lowercase
<?xml, and §2.6 explicitly reserves anycase variation of "xml" as a processing-instruction target — so the
output is neither a valid declaration nor a valid PI, and strict parsers
(e.g. .NET
XDocument.Parse) reject it.encoding="UTF?8"is not a valid encoding name — the-appears to havebeen corrupted into a
?. It should beUTF-8.This changes only that one string literal to a spec-compliant declaration:
No other behavior changes; the element/attribute structure is untouched.
I understand from #71 that you don't maintain the XML config feature — this
is offered purely as a minimal correctness fix so the output parses with
standards-compliant XML parsers without a client-side workaround. Feel free
to take or leave it.