Bug 46782 - list of what characters need to be escaped is hard to find
list of what characters need to be escaped is hard to find
Status: RESOLVED INVALID
Product: Apache httpd-2
Classification: Unclassified
Component: Documentation
2.2.11
All Linux
: P5 trivial (vote)
: ---
Assigned To: HTTP Server Documentation List
http://perishablepress.com/press/2008...
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-03-01 09:46 UTC by Dan Jacobson
Modified: 2009-03-01 10:37 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Jacobson 2009-03-01 09:46:35 UTC
The list of what characters need to be escaped is hard to find.
Please see the above URL.
Comment 1 Dan Poirier 2009-03-01 09:55:07 UTC
You're thinking too hard.  If a parameter is documented as a regular expression, escape it like a regular expression.  Otherwise, don't.
Comment 2 Dan Jacobson 2009-03-01 10:09:46 UTC
Be sure to document it somewhere. E.g.,
A two second look at e.g., man bash shows lots when grepping 'escaped'.
Comment 3 Dan Poirier 2009-03-01 10:22:01 UTC
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.
Comment 4 Dan Jacobson 2009-03-01 10:37:28 UTC
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.)