mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
xml_node: support backslash as attribute value
XML allows attribute values like <node attr="\"/>. The XML parser wrongly reflects this case as 'Invalid_syntax'. This behavior stems from the implicit use of the 'end_of_quote' function, which considers the sequence of '\"' as a quoted '"' rather than the end of a quoted string. The patch solves this problem by making the 'end_of_quote' part of the tokenizer's scanner policy. The patch removes the 'end_of_quote' function from 'util/string.h' because it is not universal, and to avoid the ambiguity with 'SCANNER_POLICY::end_of_quote'. Fixes #4431
This commit is contained in:
@@ -96,6 +96,9 @@
|
||||
[init -> test-xml_node] XML node: name = "visible-tag"
|
||||
[init -> test-xml_node] XML node: name = "visible-tag"
|
||||
[init -> test-xml_node]
|
||||
[init -> test-xml_node] -- Test backslash as attribute value --
|
||||
[init -> test-xml_node] attribute value: '\'
|
||||
[init -> test-xml_node]
|
||||
[init -> test-xml_node] -- Test exporting decoded content from XML node --
|
||||
[init -> test-xml_node] step 1
|
||||
[init -> test-xml_node] step 2
|
||||
|
||||
Reference in New Issue
Block a user