strip_formatting¶
Summary¶
- strip_formatting(string $str, string $allowableTags =, string $fallbackStr =)¶
Strip HTML formatting (i.e. tags) from the provided string.
This is essentially a wrapper around PHP’s strip_tags() function, with theadded benefit of returning a fallback string in case the resulting strippedstring is empty or contains only whitespace.
Parameters: - $str (string) – The string to be stripped of HTML formatting.
- $allowableTags (string) – The string of tags to allow when stripping tags.
- $fallbackStr (string) – The string to be used as a fallback.
Returns: The stripped string.