竞博jbo首页

Weaving dream dedecms background publishing articles hint that the title should not be empty.

Author: royal network date: 2019-11-20 20:35 source: second

Problem symptoms: after V5.7 login to the background, it will be OK to issue the English Headline.


The root cause of the problem: htmlspecialchars in php5.4 is utf8 encoded by default, and the GBK string is empty after htmlspecialchars escaping, that is, the title is empty.


Solution: add ENT_ to htmlspecialchars. COMPAT,'GB2312'parameter modifies the default value.


Specific modification page:


1, dede/article_ Add.php and dede/article_ Edit.php


$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 row

Replace htmlspecialchars ($value) with htmlspecialchars ($value, ENT_). COMPAT,'GB2312')


Test, publish article successfully.

Hot recommendation

technical college

Shou Yu network provides technical knowledge for website construction, SEO optimizes knowledge and server technology knowledge.

Station College

SEO tutorial

Server knowledge

Weaving dream dedecms background publishing articles hint that the title should not be empty.

Date: 2019-11-20 20:35 first royal online browsing: 115 times

Problem symptoms: after V5.7 login to the background, it will be OK to issue the English Headline.


The root cause of the problem: htmlspecialchars in php5.4 is utf8 encoded by default, and the GBK string is empty after htmlspecialchars escaping, that is, the title is empty.


Solution: add ENT_ to htmlspecialchars. COMPAT,'GB2312'parameter modifies the default value.


Specific modification page:


1, dede/article_ Add.php and dede/article_ Edit.php


$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 row

Replace htmlspecialchars ($value) with htmlspecialchars ($value, ENT_). COMPAT,'GB2312')


Test, publish article successfully.

Website template