Jump to content

about highlight_string


vividona

Recommended Posts

After I clean my data using htmlspecialchars

I used this code to insert come html tags

public function bb_php($string)
{
	$string = str_replace ( '&', '&', $string );
        $string = str_replace ( ''', '', $string );
        $string = str_replace ( '"', '', $string );
        $string = str_replace ( '<', '<', $string );
        $string = str_replace ( '>', '>', $string );
	$match = array('#\[php\](.*?)\[\/php\]#se');
	$replace = array("'<div>'.highlight_string(stripslashes('$1'), true).'</div>'");

	return preg_replace($match, $replace, $string);
}

 

is this will cause security issue in future???

 

[attachment deleted by admin]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.