summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-13 15:04:09 -0400
committerJune McEnroe <june@causal.agency>2020-04-13 15:04:09 -0400
commit62f17889aed9a0488173d16f28adcefa41daa204 (patch)
treeb3dad9b30b8244891d6b6d8eeb55c61e114a2d30
parentExport content to Atom (diff)
downloadbubger-62f17889aed9a0488173d16f28adcefa41daa204.tar.gz
bubger-62f17889aed9a0488173d16f28adcefa41daa204.zip
Use <content type="text"> in Atom
The <content type="html"><pre> thing would require the text to be
escaped twice...
-rw-r--r--atom.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/atom.c b/atom.c
index 80639a3..d3463ce 100644
--- a/atom.c
+++ b/atom.c
@@ -72,27 +72,11 @@ int atomEntryOpen(FILE *file, const struct Envelope *envelope) {
 }
 
 int atomContentOpen(FILE *file) {
-	const char *template = TEMPLATE(
-		<content type="html">
-		[<pre>]
-	);
-	struct Variable vars[] = {
-		{ "<pre>", "<pre>" },
-		{0},
-	};
-	return templateRender(file, template, vars, escapeXML);
+	return templateRender(file, TEMPLATE(<content type="text">), NULL, NULL);
 }
 
 int atomContentClose(FILE *file) {
-	const char *template = TEMPLATE(
-		[</pre>]
-		</content>
-	);
-	struct Variable vars[] = {
-		{ "</pre>", "</pre>" },
-		{0},
-	};
-	return templateRender(file, template, vars, escapeXML);
+	return templateRender(file, TEMPLATE(</content>), NULL, NULL);
 }
 
 int atomEntryClose(FILE *file) {
class='logsubject'>Disable signing commitsJune McEnroe Why did I ever turn this on? This gets me nothing but inconvenience. RIP to all the wasted bytes in my git repos. 2019-12-19Ignore about-filterJune McEnroe 2019-12-19Fix matching make tags with no sourcesJune McEnroe 2019-12-19Avoid matching := assignments as tagsJune McEnroe 2019-12-18Hide line numbers when rendering mdocJune McEnroe Hack: output an extra <td> after rendering mdoc so that line numbers can be hidden based on there being three. This required splitting source-filter and about-filter since on about pages there is no table. 2019-12-18Customize cgit CSSJune McEnroe 2019-12-18Use :target rather than :focus pseudo-classJune McEnroe :target persists after you click on something else. 2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe 2019-12-18Add git.causal.agency cgit configJune McEnroe 2019-12-18Bail from hi if input is binaryJune McEnroe NULs in the input cause an infinite loop in htmlEscape, not to mention regexes obviously not working, etc. 2019-12-16Post "cgit setup"June McEnroe