add a test and note about XML empty tags - sfeed_tests - sfeed tests and RSS and Atom files
(HTM) git clone git://git.codemadness.org/sfeed_tests
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit be88cd67a64b430a07e9321c9cd21c93110e48a5
(DIR) parent 9ccd28aa0d33bc72281ee55cadee188c6598e0ef
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 11 Sep 2024 23:09:53 +0200
add a test and note about XML empty tags
Document this known quirk and that it is an expected behaviour.
Diffstat:
M input/sfeed/atom/content_linebreak… | 33 +++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/input/sfeed/atom/content_linebreak_end_tags.xml b/input/sfeed/atom/content_linebreak_end_tags.xml
@@ -11,4 +11,37 @@ type="text" bla="2"
>
</entry
>
+
+<entry>
+<title>#2</title>
+<content type="html">
+test content<b>bold</b>
+</content>
+</entry>
+
+<!-- Officially an empty XML tag should end with "/>" without whitespace, so
+this is invalid. However this XML parser is not strict and will support it,
+since the alternative is rejecting all the input.
+See: https://www.w3.org/TR/REC-xml/#dt-empty
+
+When parsing it as HTML it is also an error, but browsers will process the tag
+anyway.
+-->
+<entry>
+<title>#3</title>
+<content type="html">
+test content
+<shorttag1 />
+<shorttag2 />
+<shorttag3 />
+<shorttag4/>
+<shorttag5
+/>
+
+<!-- invalid: -->
+<shorttag6/
+>
+</content>
+</entry>
+
</feed>