xml() static public method

Converts a string to a xml-safe string Converts it to html-safe first and then it will replace html entities to xml entities
static public xml ( string $text, boolean $html = true ) : string
$text string
$html boolean True: convert to html first
return string
Ejemplo n.º 1
0
 public function testXml()
 {
     $this->assertEquals('Super Äwesøme String', str::xml($this->sample));
 }
Ejemplo n.º 2
0
function xml($text)
{
    return str::xml($text);
}
Ejemplo n.º 3
0
 function testXml()
 {
     $this->assertEqual(str::xml('some über crazy stuff'), 'some über crazy stuff');
 }