commit 6f3763f

default  ·  2024-05-11 17:15:18 +0000 UTC
parent e1ce85d
Show 'Event' object types as Notes.
3 files changed,  +4, -4
M html.c
M snac.h
+2, -3
 1@@ -311,9 +311,8 @@ xs_str *sanitize(const char *content)
 2 
 3                 s = xs_str_cat(s, s2);
 4             } else {
 5-                /* else? just show it with encoded code.. that's it. */
 6-                xs *el = encode_html(v);
 7-                s = xs_str_cat(s, el);
 8+                if (strcmp(v, "</div>"))
 9+                    s = xs_str_cat(s, "<p>");
10             }
11         }
12         else {
M html.c
+1, -0
1@@ -1407,6 +1407,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2     else
3     if (!xs_match(type, POSTLIKE_OBJECT_TYPE)) {
4         /* skip oddities */
5+        snac_debug(user, 1, xs_fmt("html_entry: ignoring object type '%s' %s", type, id));
6         return NULL;
7     }
8 
M snac.h
+1, -1
1@@ -29,7 +29,7 @@ extern int dbglevel;
2 
3 #define L(s) (s)
4 
5-#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video"
6+#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video|Event"
7 
8 int mkdirx(const char *pathname);
9