How to convert the tags into html entities in addition to these tags?

The question in the subject. The input to the function should receive a text with html tags, the tags should not be converted and the flag that denotes whether or not to circumcise parameters of tags (<h1 href></h1>). The output is actually converted string.
A sample frame:
function reform_html_string($string, $tags = ", $cut_params = false) {
 if ( !$tags ) {
 return htmlspecialchars($string);
}
// TODO: 
}
June 26th 19 at 14:12
0 answer

Find more questions by tags HTMLPHP