132Citrix NetScaler Policy Configuration and Reference Guide

Operations That Evaluate HTML and XML Encoding

HTML or XML Operation

Description

 

 

text.HTTP_URL_SAFE

Converts unsafe URL characters to '%xx' values,

 

where “xx” is a hex-based representation of the

 

input character. For example, the ampersand (&) is

 

represented as %26 in URL-safe encoding. This is

 

a read-only operation.

 

Following are URL safe characters. All others are

 

unsafe:

 

Alpha-numeric characters: a-z, A-Z, 0-9

 

Asterix: "*"

 

Ampersand: "&"

 

At-sign: "@"

 

Colon: ":"

 

Dollar: "$"

 

Dot: "."

 

Equals: "="

 

Exclamation mark: "!"

 

• Hyphen: "-"

 

• Open and close parentheses: "(", ")"

 

Plus: "+"

 

Semicolon: ";"

 

Single quote: "'"

 

Slash: "/"

 

Tilde: "~"

 

• Underscore: "_"

 

 

text.MARK_SAFE

Marks the text as safe without applying any type of

 

data transformation.

text.SET_TEXT_

Transforms all %HH encoding in the byte stream.

MODE(URLENCODEDNOURLENCODE

This operation works with characters (not bytes).

D)

By default, a single byte represents a character in

 

ASCII encoding. However, if you specify

 

URLENCODED mode, three bytes can represent a

 

character.

 

In the following example, a PREFIX(3) operation

 

selects the first 3 characters in a target.

 

http.req.url.hostname.prefix(3)

 

In the following example, the NetScaler can select

 

up to 9 bytes from the target:

 

http.req.url.hostname.set_text_

 

mode(urlencoded).prefix(3)

text.SET_TEXT_MODE(PLUS_AS_

Specifies how to treat the plus character (+). The

SPACENO_PLUS_AS_SPACE)

PLUS_AS_SPACE option replaces a plus

 

character with white space. For example, the text

 

“hello+world” becomes “hello world.” The NO_

 

PLUS_AS_SPACE option leaves plus characters

 

as they are.

 

 

 

Page 146
Image 146
Citrix Systems 9.2 Converts unsafe URL characters to %xx values, Where xx is a hex-based representation, Unsafe, Asterix