|
|
|
Encoding
All variables in RXML 2 are accessed through entities, i.e.
&var.foo;.
By default, an entity will be HTML encoded, that is, < will be
inserted as <, > as > and & as
& However, there are instances when that is not what you
want, for example, when inserting enitities into SQL queries.
Therefore, the encoding can be controlled by applying another
encodingscheme on the entity, &scope.entity:scheme;.
Available Encoding Schemes
- none
No quoting. This is dangerous and should never be used unless you have
total control over the contents of the variable. If the variable
contains an RXML tag, the tag will be parsed.
- html
The default quoting, for inserting into regular HTML or RXML. Encoded
characters are "&", "<", ">", "\"", "\'" and "\000".
- url
For inserting variables into URLs. Encoded characters are "\000", " ",
"\t", "\n", "\r", "%", "'", "\"", "#", "&", "?", "=", "/" and ":".
- http
Uses a subset of the URL encoding scheme. Characters "&" and "?"
are not encoded as it would make inserting i.e. variables into
http-strings impossible. Encoded characters are "\000", " ", "\t",
"\n", "\r", "%", "'" and "\"".
- cookie
Uses a subset of the URL encoding scheme. Only the characters "=",
",", ";" and "%" are encoded.
- pike
For inserting into Pike strings, for use with the <pike> tag.
Encoded characters are "\"", "\\" and "\n".
- js
For inserting into Javascript strings. Encoded characters are "\b",
"\014", "\n", "\r", "\t", "\\", "'" and "\"".
- mysql
For inserting into MySQL SQL queries. Encoded characters are "\"", "'"
and "\\".
- mysql-pike
For inserting into MySQL SQL queries in pike strings. Encoded characters
are "\"", "'", "\\" and "\n".
- oracle
For inserting into SQL queries. Encoded characters are "'".
|
|