Browse Source

Show 'Event' object types as Notes.

default 11 months ago
parent
commit
6f3763f452
3 changed files with 4 additions and 4 deletions
  1. 2 3
      format.c
  2. 1 0
      html.c
  3. 1 1
      snac.h

+ 2 - 3
format.c

@@ -311,9 +311,8 @@ xs_str *sanitize(const char *content)
 
                 s = xs_str_cat(s, s2);
             } else {
-                /* else? just show it with encoded code.. that's it. */
-                xs *el = encode_html(v);
-                s = xs_str_cat(s, el);
+                if (strcmp(v, "</div>"))
+                    s = xs_str_cat(s, "<p>");
             }
         }
         else {

+ 1 - 0
html.c

@@ -1407,6 +1407,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
     else
     if (!xs_match(type, POSTLIKE_OBJECT_TYPE)) {
         /* skip oddities */
+        snac_debug(user, 1, xs_fmt("html_entry: ignoring object type '%s' %s", type, id));
         return NULL;
     }
 

+ 1 - 1
snac.h

@@ -29,7 +29,7 @@ extern int dbglevel;
 
 #define L(s) (s)
 
-#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video"
+#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video|Event"
 
 int mkdirx(const char *pathname);