Documentation

SanitizeHtml

 string CBXSanitizer::SanitizeHtml(
 string html
)

The method cleans HTML passed as a parameter of tags and attributes not included into the whitelist.

Returns cleaned html.

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

Parameters

ParameterDescription
htmltext in html format.

Examples

  $filteredHtml = $Sanitizer->SanitizeHtml("Sanitize me please!");


© «Bitrix24», 2001-2022
Up