src/tools/Markdown.php
function esc($str) {
		if (!$this->special)
			$this->special=array(
				'...'=>'&hellip;',
				'(tm)'=>'&trade;',
				'(r)'=>'&reg;',
				'(c)'=>'&copy;'
			);
		foreach ($this->special as $key=>$val)
			$str=preg_replace('/'.preg_quote($key,'/').'/i',$val,$str);
		return htmlspecialchars($str,ENT_COMPAT,
			Base::instance()->get('ENCODING'),FALSE);
	}
function esc($str) {
		if (!$this->special)
			$this->special=array(
				'...'=>'&hellip;',
				'(tm)'=>'&trade;',
				'(r)'=>'&reg;',
				'(c)'=>'&copy;'
			);
		foreach ($this->special as $key=>$val)
			$str=preg_replace('/'.preg_quote($key,'/').'/i',$val,$str);
		return htmlspecialchars($str,ENT_COMPAT,
			Base::instance()->get('ENCODING'),FALSE);
	}
function esc ( $ str ) { if ( ! $ this -> special ) $ this -> special = array ( '...' => '&hellip;' , '(tm)' => '&trade;' , '(r)' => '&reg;' , '(c)' => '&copy;' ) ; foreach ( $ this -> special as $ key => $ val ) $ str = preg_replace ( '/' . preg_quote ( $ key , '/' ) . '/i' , $ val , $ str ) ; return htmlspecialchars ( $ str , ENT_COMPAT , Base :: instance ( ) -> get ( 'ENCODING' ) , FALSE ) ; }
Convert characters to HTML entities
@return string
@param $str string
Convert characters to HTML entities