竞博jbo首页

Zhimeng dedecms background post article prompt Title cannot be empty

Author: shouyu.com date: 20:35, November 20, 2019 second

Problem symptom: after v5.7 logs in to the background, it is OK to publish the English title, and the Chinese version will prompt "the title cannot be empty".


Root cause of the problem: htmlspecialchars are utf8 encoded by default in php5.4, and the Chinese string of GBK encoded string after being escaped by htmlspecialchars is empty, that is, the title is empty.


Solution: add ent to htmlspecialchars_ Compat, the 'GB2312' parameter modifies the default value of encoding.


Specific modification page:


1、dede/article_ Add.php and Dede / article_ edit.php


Set $title = htmlspecialchars (CN_ substrR($title,$cfg_ title_ maxlen));

Change to

$title = htmlspecialchars(cn_ substrR($title,$cfg_ title_ maxlen),ENT_ COMPAT ,'GB2312');


2、include/ckeditor/ckeditor_ Php5.php 138 line

Replace htmlspecialchars ($value) with htmlspecialchars ($value, ENT)_ COMPAT ,'GB2312')


Test, published the article successfully.

Hot spot recommendation

technical college

Shouyu network provides technical knowledge of website construction, SEO 竞博jbo竞博jbo首页 and server technology

Jianzhan College

SEO tutorial

Server knowledge

Zhimeng dedecms background post article prompt Title cannot be empty

Date: 20:35, November 20, 2019

Problem symptom: after v5.7 logs in to the background, it is OK to publish the English title, and the Chinese version will prompt "the title cannot be empty".


Root cause of the problem: htmlspecialchars are utf8 encoded by default in php5.4, and the Chinese string of GBK encoded string after being escaped by htmlspecialchars is empty, that is, the title is empty.


Solution: add ent to htmlspecialchars_ Compat, the 'GB2312' parameter modifies the default value of encoding.


Specific modification page:


1、dede/article_ Add.php and Dede / article_ edit.php


Set $title = htmlspecialchars (CN_ substrR($title,$cfg_ title_ maxlen));

Change to

$title = htmlspecialchars(cn_ substrR($title,$cfg_ title_ maxlen),ENT_ COMPAT ,'GB2312');


2、include/ckeditor/ckeditor_ Php5.php 138 line

Replace $chars with $specialvalue_ COMPAT ,'GB2312')


Test, published the article successfully.

Site template

var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?bdf2c820cd338c78dd59a7e5533694ae"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); document.write (''); document.write ('');