Documentation

UpdateTags

int CBXSanitizer::UpdateTags(
 array arTags
)

The method updates tag an attributes included in the whitelist.

Returns the number of tags updated in the whitelist.

CBXSanitizer::UpdateTags() can be called only as the initialized object method and not as static method of CBXSanitizer class.

Parameters

ParameterDescription
arTagsArray containing tags and attributes of tags included into the whitelist. It has the following structure:
  • Permitted tag name 1
    • Attribute name 1
    • Attribute name 2
    • ...
  • Permitted tag name 2
    • Attribute name 1
    • Attribute name 2
    • ...
  • ...
    • ...

Example

  $Sanitizer->UpdateTags( array (
                  'a' = > array('href','id','style','alt'...),
                  'br' => array()
                  ));


© «Bitrix24», 2001-2024
Up