-
在后台SEO设置里,在" - "的前后都添加了空格
保存设置以后 在浏览器标题上显出不出空格:
SEO设置不支持空格解决方案:
修改文件:source/function/function_core.php 2506 行附近 修改之前请备份好原文件~!
查找:- function strreplace_strip_split($searchs, $replaces, $str) {
- $searchspace = array('((\s*\-\s*)+)', '((\s*\,\s*)+)', '((\s*\|\s*)+)', '((\s*\t\s*)+)', '((\s*_\s*)+)');
- $replacespace = array('-', ',', '|', ' ', '_');
- return trim(preg_replace($searchspace, $replacespace, str_replace($searchs, $replaces, $str)), ' ,-|_');
- }
复制代码 替换为:- function strreplace_strip_split($searchs, $replaces, $str) {
- $searchspace = array('(((\s)*\-(\s)*)+)', '((\s*\,\s*)+)', '((\s*\|\s*)+)', '((\s*\t\s*)+)', '((\s*_\s*)+)');
- $replacespace = array('$3-$3', ',', '|', ' ', '_');
- return trim(preg_replace($searchspace, $replacespace, str_replace($searchs, $replaces, $str)), ' ,-|_');
- }
复制代码 后台更新缓存!
这样就可以解决了,但是得修改源码,以后升级很不方便,建议2.5能修正过来。
|