正在显示
1 个修改的文件
包含
2 行增加
和
8 行删除
| @@ -598,10 +598,7 @@ class BTemplateLogic extends BaseLogic | @@ -598,10 +598,7 @@ class BTemplateLogic extends BaseLogic | ||
| 598 | */ | 598 | */ |
| 599 | public function handleTemplateHtml($html){ | 599 | public function handleTemplateHtml($html){ |
| 600 | //字符串截取 | 600 | //字符串截取 |
| 601 | - $param['main_html'] = characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s'); | ||
| 602 | - if(empty($param['main_html'])){ | ||
| 603 | - $param['main_html'] = characterTruncationStr($html,"<main","</main>"); | ||
| 604 | - } | 601 | + $param['main_html'] = characterTruncationStr($html,"<main","</main>"); |
| 605 | $param['main_css'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'); | 602 | $param['main_css'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'); |
| 606 | return $this->success($param); | 603 | return $this->success($param); |
| 607 | } | 604 | } |
| @@ -649,10 +646,7 @@ class BTemplateLogic extends BaseLogic | @@ -649,10 +646,7 @@ class BTemplateLogic extends BaseLogic | ||
| 649 | if($is_custom != BTemplate::IS_NO_CUSTOM){ | 646 | if($is_custom != BTemplate::IS_NO_CUSTOM){ |
| 650 | return true; | 647 | return true; |
| 651 | } | 648 | } |
| 652 | - $main_html = characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s'); | ||
| 653 | - if(!empty($main_html)){ | ||
| 654 | - $main_html = characterTruncationStr($html,"<main","</main>"); | ||
| 655 | - } | 649 | + $main_html = characterTruncationStr($html,"<main","</main>"); |
| 656 | $data = [ | 650 | $data = [ |
| 657 | 'template_id'=>$template_id, | 651 | 'template_id'=>$template_id, |
| 658 | 'project_id'=>$this->user['project_id'], | 652 | 'project_id'=>$this->user['project_id'], |
-
请 注册 或 登录 后发表评论