escXml() 공개 정적인 메소드

Escape string before save it as xml content
public static escXml ( $string ) : mixed
$string
리턴 mixed
예제 #1
0
파일: Filter.php 프로젝트: jbzoo/utils
 /**
  * @param $string
  * @return string
  */
 public static function xml($string)
 {
     return Str::escXml($string);
 }
예제 #2
0
파일: StringTest.php 프로젝트: jbzoo/utils
 public function testEscXML()
 {
     isSame('&lt;a href=&quot;/test&quot;&gt;Test!@#$%^&amp;*()_+\\/&lt;/a&gt;', Str::escXml('<a href="/test">Test!@#$%^&*()_+\\/</a>'));
 }