The reserved characters of an URI are mostly used as delimiters -- it doesn’t mean that they may not be used, it only means that they have a special purpose, and if you don’t need them for this purpose, you have to percent-encode them.
The query component starts with the first ?
and ends with the first #
(if any, otherwise with the end of the URI). For the query component itself, there are no reserved characters defined.
The URI standard RFC 3986 defines that the query component can contain these characters:
a
-z
, A
-Z
0
-9
/
?
:
@
!
$
&
'
(
)
*
+
,
;
=
-
.
_
~
- percent-encoded characters
It even explicitly mentions:
The characters slash ("/") and question mark ("?") may represent data within the query component.
The query component of your example URI is this:
embedded=true&url=http://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf
Apart from letters, it contains =
, &
, :
, /
, .
, ?
, _
, all of which are allowed in the query.
Note that the name=value
format (separated by &
) in the query component is just a convention, not something defined in the specification.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…