亚洲精品视频一区二区,一级毛片在线观看视频,久久国产a,狠狠狠色丁香婷婷综合久久五月,天天做天天欢摸夜夜摸狠狠摸

西安做網(wǎng)站_西安網(wǎng)站建設公司_西安網(wǎng)頁(yè)制作_西安網(wǎng)頁(yè)設計_西安網(wǎng)站制作設計公司

 找回密碼
 注冊

QQ登錄

只需一步,快速開(kāi)始

搜索
查看: 11414|回復: 0
打印 上一主題 下一主題

discuz關(guān)于dhtmlspecialchars

[復制鏈接]
跳轉到指定樓層
樓主
發(fā)表于 2017-5-8 01:26:29 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
php5.4及以上版本會(huì )有此問(wèn)題
解決辦法:
1. 找到 uc_client/lib/uccode.class.php 文件
2.將 $message = htmlspecialchars($message); 替換為 $message = dhtmlspecialchars($message);

關(guān)于dhtmlspecialchars 是 discuz自定義的將字符轉化為Html實(shí)體的函數,對php版本做了兼容
  1. function dhtmlspecialchars($string, $flags = null) {
  2.       if(is_array($string)) {
  3.           foreach($string as $key => $val) {
  4.               $string[$key] = dhtmlspecialchars($val, $flags);
  5.           }
  6.       } else {
  7.           if($flags === null) {
  8.               $string = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $string);
  9.               if(strpos($string, '&#') !== false) {
  10.                  //過(guò)濾掉類(lèi)似志的16進(jìn)制的html字符
  11.                  $string = preg_replace('/&((#(\d{3,5}|x[a-fA-F0-9]{4}));)/', '&\\1', $string);
  12.              }
  13.          } else {
  14.              if(PHP_VERSION < '5.4.0') {
  15.                  $string = htmlspecialchars($string, $flags);
  16.              } else {
  17.                  if(strtolower(CHARSET) == 'utf-8') {
  18.                      $charset = 'UTF-8';
  19.                  } else {
  20.                      $charset = 'ISO-8859-1';
  21.                  }
  22.                  $string = htmlspecialchars($string, $flags, $charset);
  23.              }
  24.          }
  25.      }
  26.      return $string;
  27. }
復制代碼


西安網(wǎng)站建設 | 西安做網(wǎng)站 —— 劍鋒所指 所向披靡!
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規則

QQ|小黑屋|手機版|Archiver|西安網(wǎng)站建設

GMT+8, 2025-3-7 05:24 , Processed in 0.037120 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回復 返回頂部 返回列表
亚洲精品视频一区二区,一级毛片在线观看视频,久久国产a,狠狠狠色丁香婷婷综合久久五月,天天做天天欢摸夜夜摸狠狠摸