作者 lyh
@@ -119,6 +119,8 @@ class ProjectImport extends Command @@ -119,6 +119,8 @@ class ProjectImport extends Command
119 } 119 }
120 } 120 }
121 121
  122 + $v[0] = $this->special2str($v[0]);
  123 +
122 $total_count += 1; 124 $total_count += 1;
123 try { 125 try {
124 if ($task->type == ImportTask::TYPE_NEWS) { 126 if ($task->type == ImportTask::TYPE_NEWS) {
@@ -200,6 +202,30 @@ class ProjectImport extends Command @@ -200,6 +202,30 @@ class ProjectImport extends Command
200 return false; 202 return false;
201 } 203 }
202 204
  205 + //特殊字符转换
  206 + protected function special2str($str)
  207 + {
  208 + if (strpos($str, ';') === false) {
  209 + return $str;
  210 + }
  211 +
  212 + $list = [
  213 + '&lt;' => '<',
  214 + '&gt;' => '>',
  215 + '&amp;' => '&',
  216 + '&acute;' => "'",
  217 + '&quot;' => '"',
  218 + '&nbsp;' => ' ',
  219 + '&#x27;' => "'"
  220 + ];
  221 +
  222 + foreach ($list as $k => $v) {
  223 + $str = str_replace($k, $v, $str);
  224 + }
  225 +
  226 + return $str;
  227 + }
  228 +
203 //发送站内通知 229 //发送站内通知
204 protected function send_mail($user_list, $time, $type, $success_count, $repeat_count, $fail_count, $reason, $fail_line = []) 230 protected function send_mail($user_list, $time, $type, $success_count, $repeat_count, $fail_count, $reason, $fail_line = [])
205 { 231 {
@@ -98,6 +98,7 @@ class ProjectVisit extends Command @@ -98,6 +98,7 @@ class ProjectVisit extends Command
98 'ip' => $item['ip'] ?? '', 98 'ip' => $item['ip'] ?? '',
99 'depth' => $item['pv'], 99 'depth' => $item['pv'],
100 'domain' => $url_arr['host'] ?? '', 100 'domain' => $url_arr['host'] ?? '',
  101 + 'is_inquiry' => $item['is_cf'] ?? 0,
101 'created_at' => date('Y-m-d H:i:s', isset($item['update']) && $item['update'] ? $item['update'] : time()), 102 'created_at' => date('Y-m-d H:i:s', isset($item['update']) && $item['update'] ? $item['update'] : time()),
102 'updated_at' => date('Y-m-d H:i:s', isset($item['update']) && $item['update'] ? $item['update'] : time()), 103 'updated_at' => date('Y-m-d H:i:s', isset($item['update']) && $item['update'] ? $item['update'] : time()),
103 'updated_date' => date('Y-m-d', isset($item['c_time']) && $item['c_time'] ? strtotime($item['c_time']) : time()), 104 'updated_date' => date('Y-m-d', isset($item['c_time']) && $item['c_time'] ? strtotime($item['c_time']) : time()),