Summary: | list of what characters need to be escaped is hard to find | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Dan Jacobson <jidanni> |
Component: | Documentation | Assignee: | HTTP Server Documentation List <docs> |
Status: | RESOLVED INVALID | ||
Severity: | trivial | CC: | poirier |
Priority: | P5 | ||
Version: | 2.2.11 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://perishablepress.com/press/2008/05/13/perishable-press-3g-blacklist/#comment-70468 |
Description
Dan Jacobson
2009-03-01 09:46:35 UTC
You're thinking too hard. If a parameter is documented as a regular expression, escape it like a regular expression. Otherwise, don't. Be sure to document it somewhere. E.g., A two second look at e.g., man bash shows lots when grepping 'escaped'. To me it is documented - it says its a regular expression. If someone doesn't know what that is, the Apache web server glossary gives a brief explanation and a link to more information. If that doesn't help, there are whole books written on the subject. What would you suggest? There are many directives that use regular expressions, and I don't think inserting a book about how regular expressions work under each directive that uses one is practical. OK, I found "Apache uses Perl Compatible Regular Expressions provided by the PCRE..." Which is good enough. Too bad I was grepping on "backslash" and "escape". so I never found it... (unlike on the bash man page.) |