Sanitizer
Class Sanitizer
Table of Contents
Methods
- cleanHtml() : string|null
- Clean html.
- fixReplacedStyles() : string|null
- Fix replaced style tags and attributes.
- fixTemplateStyles() : string|null
- Fix template styles.
- removePhp() : bool
- Remove php from string with checking operations edit_php and lpa_template_edit
- sanitizeHtml() : string|null
- Clean html.
Methods
cleanHtml()
Clean html.
public
static cleanHtml(string $html) : string|null
Parameters
- $html : string
-
Html text.
Return values
string|nullfixReplacedStyles()
Fix replaced style tags and attributes.
public
static fixReplacedStyles(string $html) : string|null
Parameters
- $html : string
-
Html text.
Return values
string|nullfixTemplateStyles()
Fix template styles.
public
static fixTemplateStyles(string $html) : string|null
Parameters
- $html : string
-
Html text.
Return values
string|nullremovePhp()
Remove php from string with checking operations edit_php and lpa_template_edit
public
static removePhp([string $string = '' ], mixed $previousString[, User $user = null ]) : bool
Parameters
- $string : string = ''
-
String.
- $previousString : mixed
- $user : User = null
-
User instance.
Return values
boolsanitizeHtml()
Clean html.
public
static sanitizeHtml(string $html[, string $previousHtml = '' ][, User $user = null ]) : string|null
Parameters
- $html : string
-
Html text.
- $previousHtml : string = ''
-
Previous html text.
- $user : User = null
-
User instance.