diff options
| author | 2024-05-11 19:15:18 +0200 | |
|---|---|---|
| committer | 2024-05-11 19:15:18 +0200 | |
| commit | 6f3763f452ba55ee6ddd9f63f5bc523807e7288f (patch) | |
| tree | 675ca94f9f75462a7d875e58bc14f52fe844f884 | |
| parent | Unified post-like object type match. (diff) | |
| download | penes-snac2-6f3763f452ba55ee6ddd9f63f5bc523807e7288f.tar.gz penes-snac2-6f3763f452ba55ee6ddd9f63f5bc523807e7288f.tar.xz penes-snac2-6f3763f452ba55ee6ddd9f63f5bc523807e7288f.zip | |
Show 'Event' object types as Notes.
| -rw-r--r-- | format.c | 5 | ||||
| -rw-r--r-- | html.c | 1 | ||||
| -rw-r--r-- | snac.h | 2 |
3 files changed, 4 insertions, 4 deletions
| @@ -311,9 +311,8 @@ xs_str *sanitize(const char *content) | |||
| 311 | 311 | ||
| 312 | s = xs_str_cat(s, s2); | 312 | s = xs_str_cat(s, s2); |
| 313 | } else { | 313 | } else { |
| 314 | /* else? just show it with encoded code.. that's it. */ | 314 | if (strcmp(v, "</div>")) |
| 315 | xs *el = encode_html(v); | 315 | s = xs_str_cat(s, "<p>"); |
| 316 | s = xs_str_cat(s, el); | ||
| 317 | } | 316 | } |
| 318 | } | 317 | } |
| 319 | else { | 318 | else { |
| @@ -1407,6 +1407,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1407 | else | 1407 | else |
| 1408 | if (!xs_match(type, POSTLIKE_OBJECT_TYPE)) { | 1408 | if (!xs_match(type, POSTLIKE_OBJECT_TYPE)) { |
| 1409 | /* skip oddities */ | 1409 | /* skip oddities */ |
| 1410 | snac_debug(user, 1, xs_fmt("html_entry: ignoring object type '%s' %s", type, id)); | ||
| 1410 | return NULL; | 1411 | return NULL; |
| 1411 | } | 1412 | } |
| 1412 | 1413 | ||
| @@ -29,7 +29,7 @@ extern int dbglevel; | |||
| 29 | 29 | ||
| 30 | #define L(s) (s) | 30 | #define L(s) (s) |
| 31 | 31 | ||
| 32 | #define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video" | 32 | #define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video|Event" |
| 33 | 33 | ||
| 34 | int mkdirx(const char *pathname); | 34 | int mkdirx(const char *pathname); |
| 35 | 35 | ||