|
SA Bugzilla – Full Text Bug Listing |
Summary: | Template TAGS don't allow underscores | ||
---|---|---|---|
Product: | Spamassassin | Reporter: | Karsten Bräckelmann <guenther> |
Component: | Libraries | Assignee: | SpamAssassin Developer Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | trivial | CC: | apache, billcole, kmcgrail, sa |
Priority: | P5 | ||
Version: | 3.2.5 | ||
Target Milestone: | 4.0.0 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
Attachments: | Add word boundaries to tag regex |
Description
Karsten Bräckelmann
2009-07-21 10:12:41 UTC
Created attachment 5365 [details]
Add word boundaries to tag regex
Adds word boundaries to the start and end of the tag regex to enable underscores within a template tag.
Checks for a double underscore so that multiple tags can be squashed together without a space/punctuation if desired.
The regex along doesn't even match many of the test cases given in 4793 which avoids issues with that, and the matches it does give will resolve to an unrecognised tag and therefore the default of not changing those as introduced in the fixes would come into effect.
Thanks Kevin. It's a trivial regex and nice you made all the fixes. We'll look at this post Holiday. Allowing underscores inside a tag would be _horrible_ design, given that underscore is the separator. Just looking at any set_tag in SA sources clearly show the spirit of naming is intended to be _JUSTCAPS_. I vote making set_tag to reject anything else than _ALPHANUM(foo)_ for trunk/4.0.0 and clarifying this in documentation. +1 (In reply to Henrik Krohns from comment #3) > Allowing underscores inside a tag would be _horrible_ design, given that > underscore is the separator. Just looking at any set_tag in SA sources > clearly show the spirit of naming is intended to be _JUSTCAPS_. > > I vote making set_tag to reject anything else than _ALPHANUM(foo)_ for > trunk/4.0.0 and clarifying this in documentation. +! Made a note in documentation about alphanumeric format, per previous comments. Committed revision 1898645. |