diff options
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -2247,7 +2247,7 @@ xs_str *tag_fn(const char *tag) | |||
| 2247 | if (*tag == '#') | 2247 | if (*tag == '#') |
| 2248 | tag++; | 2248 | tag++; |
| 2249 | 2249 | ||
| 2250 | xs *lw_tag = xs_utf8_to_lower(xs_dup(tag)); | 2250 | xs *lw_tag = xs_utf8_to_lower(tag); |
| 2251 | xs *md5 = xs_md5_hex(lw_tag, strlen(lw_tag)); | 2251 | xs *md5 = xs_md5_hex(lw_tag, strlen(lw_tag)); |
| 2252 | 2252 | ||
| 2253 | return xs_fmt("%s/tag/%c%c/%s.idx", srv_basedir, md5[0], md5[1], md5); | 2253 | return xs_fmt("%s/tag/%c%c/%s.idx", srv_basedir, md5[0], md5[1], md5); |
| @@ -2832,9 +2832,9 @@ int content_match(const char *file, const xs_dict *msg) | |||
| 2832 | srv_debug(1, xs_fmt("content_match: loading regexes from %s", fn)); | 2832 | srv_debug(1, xs_fmt("content_match: loading regexes from %s", fn)); |
| 2833 | 2833 | ||
| 2834 | /* massage content (strip HTML tags, etc.) */ | 2834 | /* massage content (strip HTML tags, etc.) */ |
| 2835 | xs *c = xs_regex_replace(v, "<[^>]+>", " "); | 2835 | xs *c1 = xs_regex_replace(v, "<[^>]+>", " "); |
| 2836 | c = xs_regex_replace_i(c, " {2,}", " "); | 2836 | c1 = xs_regex_replace_i(c1, " {2,}", " "); |
| 2837 | c = xs_utf8_to_lower(c); | 2837 | xs *c = xs_utf8_to_lower(c1); |
| 2838 | 2838 | ||
| 2839 | while (!r && !feof(f)) { | 2839 | while (!r && !feof(f)) { |
| 2840 | xs *rx = xs_strip_i(xs_readline(f)); | 2840 | xs *rx = xs_strip_i(xs_readline(f)); |