Library for escaping user provided values displayed for example in input etc

package midcom.helper

 Methods

escape_attribute (string $input)

Escape value of an XML attribute, also adds quotes around it
Static

Parameters

$input

stringAttribute value to escape

Returns

stringescaped $input (with added quotes)

escape_element (string $element, string $input)

Escape contents of an XML element (basically prevents early closure of the element)
Static

Parameters

$element

stringXML element to close

$input

stringElement content to escape

Returns

string$input with $element closing tags escaped