Lines Matching refs:html
4 function process_character_references(&$html) { argument
8 $html = str_replace("&{$entity};","&#{$code};",$html);
18 $html = preg_replace("/&{$entity}([\s<])/","&#{$code};\\1",$html);
22 while (preg_match("/&#x([[:xdigit:]]{2,4});/i", $html, $matches)) {
27 $html = preg_replace("/&#x".$matches[1].";/i","&#".hexdec($matches[1]).";",$html);
31 function escape_amp($html) { argument
34 $html = preg_replace("/&(?!#)/si","&\\1",$html);
37 $html = preg_replace("/&#(\d+)(?![\d;])/si","&#\\1;",$html);
44 $html = preg_replace("/&(?!#\d)/si","&\\1",$html);
46 return $html;
49 function escape_lt($html) { argument
58 while (preg_match("#<(\s*[^!/a-zA-Z])#",$html)) {
59 $html = preg_replace("#<(\s*[^!/a-zA-Z])#si","<\\1",$html);
62 while (preg_match("#(<[^>]*?)<#si",$html)) {
63 $html = preg_replace("#(<[^>]*?)<#si","\\1<",$html);
66 return $html;
69 function escape_gt($html) { argument
70 $html = preg_replace("#([^\s\da-zA-Z'\"/=-])\s*>#si","\\1>",$html);
72 while (preg_match("#(>[^<]*?)>#si",$html)) {
73 $html = preg_replace("#(>[^<]*?)>#si","\\1>",$html);
76 return $html;