Universeorange.com/Docs/

R3m/framework Function reference string.tag.strip

{string.tag.strip(String $string, String | Array $allowable_tags=null)}

Strip HTML and PHP tags from a string. This function tries to return a string with all NULL bytes, HTML and PHP tags stripped from a given string.

string
    The input string.   
allowed_tags
    You can use the optional second parameter to specify tags which should not be stripped. 
    These are either given as string, or as of PHP 7.4.0, as array. 
    Refer to the example below regarding the format of this parameter. 

// Allow <p> and <a>
{$stripped = string.tag.strip($text, '<p><a>')}

// as of PHP 7.4.0 the line above can be written as:
{$stripped = string.tag.strip($text, ['p','a'])}

Returns the stripped string.

More information:

https://www.php.net/manual/en/function.strip-tags.php

Last modified: 2021-06-07

© 2021 universeorange.com