removeAttributes

Availability: >= 3.0

Type: Object Method

Description: Removes unwanted attributes such as JavaScript event handlers.

Syntax:

string $html wproUtilities::removeAttributesstring $html, array $attributes );

Parameters: 

$code
the html code to be processed.

$attributes
an array of attributes to remove. You can use pattern matching in your attribute names, e.g. this will remove all event handlers:

$code =  wproUtilities::removeAttributes($code, array("on[A-Z]+"));