From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 9c863e2c for ; Tue, 8 Nov 2016 10:57:58 -0500 (EST) Date: Tue, 8 Nov 2016 10:57:58 -0500 (EST) Message-Id: <14811895671032128322.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: skip leading \& and \e in tags X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- skip leading \& and \e in tags Modified Files: -------------- mdocml: tag.c Revision Data ------------- Index: tag.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/tag.c,v retrieving revision 1.14 retrieving revision 1.15 diff -Ltag.c -Ltag.c -u -p -r1.14 -r1.15 --- tag.c +++ tag.c @@ -130,7 +130,13 @@ tag_put(const char *s, int prio, size_t size_t len; unsigned int slot; - if (tag_files.tfd <= 0 || strchr(s, ' ') != NULL) + /* Sanity checks. */ + + if (tag_files.tfd <= 0) + return; + if (s[0] == '\\' && (s[1] == '&' || s[1] == 'e')) + s += 2; + if (*s == '\0' || strchr(s, ' ') != NULL) return; slot = ohash_qlookup(&tag_data, s); -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv