Introduction
Introduction Statistics Contact Development Disclaimer Help
sfeed_atom: in Atom the default for a type is text - sfeed - RSS and Atom parser
git clone git://git.codemadness.org/sfeed
Log
Files
Refs
README
LICENSE
---
commit 14cce37fa54608362dc2d19ff66d10b64e5777b1
parent a15c98f32d8a768fee7b6783f7cea710cc5878a9
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 10 Apr 2023 16:40:56 +0200
sfeed_atom: in Atom the default for a type is text
Save a few bytes in the output by removing it.
https://www.rfc-editor.org/rfc/rfc4287
3.1.1. The "type" Attribute
The title is an atomTextConstruct.
Diffstat:
M sfeed_atom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sfeed_atom.c b/sfeed_atom.c
@@ -95,7 +95,7 @@ printfeed(FILE *fp, const char *feedname)
/* NOTE: an RSS/Atom viewer may or may not for…
whitespace such as newlines.
Workaround: type="html" and <![CDATA[<pre><…
- fputs("\t<content type=\"text\">", stdout);
+ fputs("\t<content>", stdout);
}
printcontent(fields[FieldContent]);
fputs("</content>\n", stdout);
@@ -132,7 +132,7 @@ main(int argc, char *argv[])
fputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<feed xmlns=\"http://www.w3.org/2005/Atom\">\n"
- "\t<title type=\"text\">Newsfeed</title>\n"
+ "\t<title>Newsfeed</title>\n"
"\t<author><name>sfeed</name></author>\n", stdout);
printf("\t<id>urn:newsfeed:%lld</id>\n"
"\t<updated>%04d-%02d-%02dT%02d:%02d:%02dZ</updated>\n",
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.