I notice Wikipedia allows them in their URLs, is it legit or does anyone know where it will give me problems?
3 Answers
It's legit and intended to be a delimiter ; see Uniform Resource Identifier (URI): Generic Syntax

- 19,179
- 10
- 84
- 156

- 19,247
- 4
- 40
- 67
-
Thanks for the answer years ago forgot to say so! – Kristopher Ives Oct 04 '16 at 21:49
As per http://www.ietf.org/rfc/rfc1738.txt YES, you can.
...Only alphanumerics [0-9a-zA-Z], the special characters "$-_.+!*'()," [not including the quotes - ed], and reserved characters used for their reserved purposes may be used unencoded within a URL.
refer: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

- 54,584
- 13
- 112
- 127
-
1Wasn't me, honest! I chose the other answer because it was shorter and used the word "legit" (I'm a simple person) – Kristopher Ives Jan 14 '11 at 17:46
-
2You are citing a really ancient document. The latest and greatest is RFC 3986. – Julian Reschke Mar 27 '12 at 16:50
Yes. All of the sub-delims
characters can be used as is in the path. Sub-delimiters include the asterisk (*
) character:
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
There are several types of URIs, but in general, a path is defined as a set of segments separated by a slash:
path-absolute = "/" [ segment-nz *( "/" segment ) ]
The segments are composed of characters (segment-nz
cannot be empty):
segment = *pchar
segment-nz = 1*pchar
And pchar
includes sub-delims
:
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
Reference: https://www.rfc-editor.org/rfc/rfc3986#appendix-A

- 1
- 1

- 19,179
- 10
- 84
- 156