further work, regarding the display of HTML messages, ...

This commit is contained in:
Klaus Leithoff 2009-05-29 14:13:50 +00:00
parent af026d125e
commit a13fec8ae1
2 changed files with 7 additions and 4 deletions

View File

@ -856,7 +856,8 @@
"style",array( "style",array(
"type" => array('maxlen' => 20), "type" => array('maxlen' => 20),
"color" => array('maxlen' => 20), "color" => array('maxlen' => 20),
"background-color" => array('maxlen' => 20) "background-color" => array('maxlen' => 20),
"background" => array('maxlen' => 5),
) )
); );
@ -968,7 +969,9 @@
// no scripts allowed // no scripts allowed
// clean out comments // clean out comments
$search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript $search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript
'@<!--[\s\S]*?[ \t\n\r]*-->@' // Strip multi-line comments including CDATA '@<!--[\s\S]*?[ \t\n\r]*-->@', // Strip multi-line comments including CDATA
'@<head[^>]*?>.*?</head>@si', // Strip out head tag
'@url\(http:\/\/[^\)].*?\)@si', // url calls e.g. in style definitions
); );
$_html = preg_replace($search,"",$_html); $_html = preg_replace($search,"",$_html);

View File

@ -165,8 +165,8 @@
$sbody = $body; $sbody = $body;
while(@eregi($pattern, $sbody, $regs)) { while(@eregi($pattern, $sbody, $regs)) {
#_debug_array($regs); #_debug_array($regs);
$key=$regs[3].$regs[4].$regs[5]; $key=$regs[1].$regs[3].$regs[4].$regs[5];
$addresses[$key] = $regs[1].$regs[2].$regs[3].$regs[4].$regs[5]; $addresses[$key] = $regs[1].$regs[3].$regs[4].$regs[5];
$start = strpos($sbody, $regs[0]) + strlen($regs[0]); $start = strpos($sbody, $regs[0]) + strlen($regs[0]);
$sbody = substr($sbody, $start); $sbody = substr($sbody, $start);
} }