模板在处理默认定界符{}时和js对象的偶然重叠导致错误(已修复内有代码)

浏览:483 发布日期:2015/02/14 分类:技术分享
* 修改 ThinkPHP\Library\Think\Template.class.php 184 模板正则缺少对 js对象格式的过滤 2015 002 13
$content = preg_replace_callback('/('.$this->config['tmpl_begin'].')(?!\'|\")([^\d\w\s'.$this->config['tmpl_begin'].$this->config['tmpl_end'].'].+?)('.$this->config['tmpl_end'].')/is', array($this, 'parseTag'),$content);
*
加粗的地方就是需要添加的正则代码
最佳答案
评论( 相关
后面还有条评论,点击查看>>