Escaping or URL-encoding parameter values
In some situations you need to pass escaped (URL-encoded) parameters values to FSI Viewer, because using unescaped values would break the XML syntax or because you need to use characters prohibited in URLs.
In cases like this you can pass escaped values rather than passing the actual value.
What does escaping (URL-encoding) mean?
URL-encoding (or percent-encoding) means converting the character to its corresponding value in ASCII and then representing that value as a pair of hexadecimal digits. The digits, preceded by a percent sign ("%"), are then used in place of the reserved character. FSI Viewer transforms URL-encoded values back to the original value.
How can I URL-encode a value?
Most scripting languages (JavaScript, ActionScript, PHP and alike) provide methods for this purpose. Please note that FSI Viewer requires Unicode safe encoding rather than non-unicode safe encoding – this is an escaped character might be represented by one or more 2-digit numbers preceded by "%".
Using JavaScript you therefore need to use the method encodeURIComponent()
instead of escape()
.