Project

General

Profile

« Previous | Next » 

Revision 820

Added by thorn over 16 years ago

ASP: off per default. CAPTCHA: removed unneeded $admin. Filename: just convert chars like quote, doublequote, < > & to empty string.

View differences:

functions-utf8.php
407 407
	$str = str_replace('&#39;', '&apos;', $str);
408 408
	$str = preg_replace('/&#([0-9]+);/e', "dechex('$1')",  $str);
409 409
	// maybe there are some &gt; &lt; &apos; &quot; &amp; &nbsp; left, replace them too
410
	$entities = array('&gt;'=>'_','&lt;'=>'_','&apos;'=>'_','&quot;'=>'_','&amp;'=>'_','&nbsp;'=>' ');
410
	$entities = array('&gt;'=>'','&lt;'=>'','&apos;'=>'','\''=>'','&quot;'=>'','&amp;'=>'','&nbsp;'=>' ');
411 411
	$str = strtr($str, $entities);
412 412
	
413 413
	return($str);

Also available in: Unified diff