Codec | --JavaScriptCodec
Located in File: /codecs/JavaScriptCodec.php
Constructor __construct (line 41)
Overrides : Codec::__construct() Populates the $hex map of non-alphanumeric single-byte characters.
Method decodeCharacter (line 121)
See http://www.planetpdf.com/codecuts/pdfs/tutorial/jsspec.pdf Formats all are legal both upper/lower case: \\a - special characters \\xHH \\uHHHH \\OOO (1, 2, or 3 digits)
Method encodeCharacter (line 55)
Overrides : Codec::encodeCharacter() Encode a Character with a Codec.
For example, if a javascript attribute, such as onmouseover, contains a \" that will close the entire attribute and allow an attacker to inject another script attribute.
Codec::__construct() - Populates the $hex map of non-alphanumeric single-byte characters.
Codec::containsCharacter() - Utility to search a char[] for a specific char.
Codec::decode() - Decode a String that was encoded using the encode method in this Class
Codec::detectEncoding() - Utility to detect a (potentially multibyte) string's encoding with extra logic to deal with single characters that mb_detect_encoding() fails upon.
Codec::encode() - Encode a String with a Codec.
Codec::encodeCharacter() - Encode a Character with a Codec.
Codec::forceToSingleCharacter() - Utility to get first (potentially multibyte) character from a (potentially multicharacter) multibyte string.
Codec::getHexForNonAlphanumeric() - Returns the ordinal value as a hex string of any character that is not a single-byte alphanumeric. The character should be supplied as a string in the UTF-32 character encoding.
Codec::isHexDigit() - Utility method to determine if a single character string is a hex digit
Codec::normalizeEncoding() - Utility to normalize a string's encoding to UTF-32.
Codec::toHex() - Return the hex value of a character as a string without leading zeroes.