作者 邓超

email

... ... @@ -165,6 +165,9 @@ class Home extends Base {
// map
$lists = array_map(function ($v){
$v['uuid'] = get_email_uuid($v['subject'],$v['udate'],$v['from'],$v['to'],$v['size']);
if(!empty($v['description'])){
$v['description'] = @html_entity_decode($v['description'], ENT_COMPAT, 'UTF-8');
}
return $v;
},$lists);
... ... @@ -636,6 +639,8 @@ class Home extends Base {
$data['uuid'] = get_email_uuid($data['subject'],$data['udate'],$data['from'],$data['to'],$data['size']);
$data['description'] = @html_entity_decode($data['description']??'', ENT_COMPAT, 'UTF-8');
$data['to_name'] = $data['to_name'] ? json_decode($data['to_name'],true) : [];
$data['cc'] = $data['cc'] ? json_decode($data['cc'],true) : [];
$data['bcc'] = $data['bcc'] ? json_decode($data['bcc'],true) : [];
... ...
... ... @@ -445,6 +445,7 @@ class Mail {
}else{
$value = $item['body'];
}
$value = @html_entity_decode($value, ENT_COMPAT, 'UTF-8');
$value=preg_replace("/<(script.*?)>(.*?)<(\/script.*?)>/si","",$value); //过滤script标签
$value=preg_replace("/<(\/?script.*?)>/si","",$value); //过滤script标签
$value=preg_replace("/javascript/si","Javascript",$value); //过滤script标签
... ...