正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -97,7 +97,7 @@ class InitHtmlLogic extends BaseLogic | @@ -97,7 +97,7 @@ class InitHtmlLogic extends BaseLogic | ||
| 97 | $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'],'is_custom'=>$is_custom,'is_list'=>$is_list]); | 97 | $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'],'is_custom'=>$is_custom,'is_list'=>$is_list]); |
| 98 | if($mainInfo === false){ | 98 | if($mainInfo === false){ |
| 99 | $data = [ | 99 | $data = [ |
| 100 | - 'main_html'=>characterTruncation($this->param['html'],'/<main\b[^>]*>(.*?)<\/main>/s'), | 100 | + 'main_html'=>characterTruncationStr($this->param['html'],"<main","</main>"), |
| 101 | 'main_css'=>characterTruncation($this->param['html'],'/<style id="globalsojs-styles">(.*?)<\/style>/s'), | 101 | 'main_css'=>characterTruncation($this->param['html'],'/<style id="globalsojs-styles">(.*?)<\/style>/s'), |
| 102 | 'section_list_id'=>$this->param['section_list_id'] ?? '', | 102 | 'section_list_id'=>$this->param['section_list_id'] ?? '', |
| 103 | 'project_id'=>$this->user['project_id'], | 103 | 'project_id'=>$this->user['project_id'], |
| @@ -108,7 +108,7 @@ class InitHtmlLogic extends BaseLogic | @@ -108,7 +108,7 @@ class InitHtmlLogic extends BaseLogic | ||
| 108 | $bTemplateMainModel->add($data); | 108 | $bTemplateMainModel->add($data); |
| 109 | }else{ | 109 | }else{ |
| 110 | $data = [ | 110 | $data = [ |
| 111 | - 'main_html'=>characterTruncation($this->param['html'],'/<main\b[^>]*>(.*?)<\/main>/s'), | 111 | + 'main_html'=>characterTruncationStr($this->param['html'],"<main","</main>"), |
| 112 | 'main_css'=>characterTruncation($this->param['html'],'/<style id="globalsojs-styles">(.*?)<\/style>/s'), | 112 | 'main_css'=>characterTruncation($this->param['html'],'/<style id="globalsojs-styles">(.*?)<\/style>/s'), |
| 113 | 'section_list_id'=>$this->param['section_list_id'] ?? '', | 113 | 'section_list_id'=>$this->param['section_list_id'] ?? '', |
| 114 | ]; | 114 | ]; |
-
请 注册 或 登录 后发表评论