hide data in <svg> tag - webdump - HTML to plain-text converter for webpages
(HTM) git clone git://git.codemadness.org/webdump
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 4e69626163451a74e090c1bdbdcc3282236d6b33
(DIR) parent ae36c548e48ddea692a87557938441bb7cd54994
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Sep 2023 23:13:34 +0200
hide data in <svg> tag
Noticed on a zdnet.com page/article which has invalid SVG data inside it. This
would show gibberish. Note that the parser still expects somewhat valid
XML/HTML.
In the future maybe this could be handled the same as <script> or <style>.
Diffstat:
M webdump.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/webdump.c b/webdump.c
@@ -105,9 +105,9 @@ enum TagId { TagA = 1, TagAddress, TagArea, TagArticle, TagAside, TagAudio,
TagLink, TagMain, TagMark, TagMenu, TagMeta, TagNav, TagObject, TagOl,
TagOption, TagP, TagParam, TagPre, TagS, TagScript, TagSearch,
TagSection, TagSelect, TagSource, TagStrike, TagStrong, TagStyle,
- TagSummary, TagTable, TagTbody, TagTd, TagTemplate, TagTextarea,
- TagTfoot, TagTh, TagThead, TagTitle, TagTr, TagTrack, TagU, TagUl,
- TagVar, TagVideo, TagWbr, TagXmp };
+ TagSummary, TagSvg, TagTable, TagTbody, TagTd, TagTemplate,
+ TagTextarea, TagTfoot, TagTh, TagThead, TagTitle, TagTr, TagTrack,
+ TagU, TagUl, TagVar, TagVideo, TagWbr, TagXmp };
struct tag {
const char *name;
@@ -322,6 +322,7 @@ static struct tag tags[] = {
{ "strong", TagStrong, DisplayInline, MarkupBold, 0, 0, 0, 0, 0, 0 },
{ "style", TagStyle, DisplayNone, 0, 0, 0, 0, 0, 0, 0 },
{ "summary", TagSummary, DisplayBlock, 0, 0, 0, 0, 0, 0, 0 },
+{ "svg", TagSvg, DisplayNone, 0, 0, 0, 0, 0, 0, 0 },
{ "table", TagTable, DisplayTable, 0, 0, 0, 0, 0, 0, 0 },
{ "tbody", TagTbody, DisplayInline, 0, DisplayTable, 0, 1, 0, 0, 0 },
{ "td", TagTd, DisplayTableCell, 0, DisplayTableRow, 0, 1, 0, 0, 0 },