summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/html.c b/html.c
index 50dc25b..4673130 100644
--- a/html.c
+++ b/html.c
@@ -10,6 +10,7 @@
10#include "xs_time.h" 10#include "xs_time.h"
11#include "xs_mime.h" 11#include "xs_mime.h"
12#include "xs_match.h" 12#include "xs_match.h"
13#include "xs_html.h"
13 14
14#include "snac.h" 15#include "snac.h"
15 16
@@ -2137,10 +2138,10 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2137 xs *bio = not_really_markdown(xs_dict_get(snac.config, "bio"), NULL); 2138 xs *bio = not_really_markdown(xs_dict_get(snac.config, "bio"), NULL);
2138 char *p, *v; 2139 char *p, *v;
2139 2140
2140 xs *es1 = encode_html_strict(xs_dict_get(snac.config, "name")); 2141 xs *es1 = xs_html_encode(xs_dict_get(snac.config, "name"));
2141 xs *es2 = encode_html_strict(snac.uid); 2142 xs *es2 = xs_html_encode(snac.uid);
2142 xs *es3 = encode_html_strict(xs_dict_get(srv_config, "host")); 2143 xs *es3 = xs_html_encode(xs_dict_get(srv_config, "host"));
2143 xs *es4 = encode_html_strict(bio); 2144 xs *es4 = xs_html_encode(bio);
2144 rss = xs_fmt( 2145 rss = xs_fmt(
2145 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" 2146 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
2146 "<rss version=\"0.91\">\n" 2147 "<rss version=\"0.91\">\n"
@@ -2168,7 +2169,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2168 if (!xs_startswith(id, snac.actor)) 2169 if (!xs_startswith(id, snac.actor))
2169 continue; 2170 continue;
2170 2171
2171 xs *content = encode_html_strict(xs_dict_get(msg, "content")); 2172 xs *content = xs_html_encode(xs_dict_get(msg, "content"));
2172 2173
2173 // We SHOULD only use sanitized one for description. 2174 // We SHOULD only use sanitized one for description.
2174 // So, only encode for feed title, while the description just keep it sanitized as is. 2175 // So, only encode for feed title, while the description just keep it sanitized as is.