dever пре 5 година
родитељ
комит
4c39e7e228
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      app/collection/lib/Content.php

+ 5 - 0
app/collection/lib/Content.php

@@ -174,6 +174,11 @@ class Content
         $content = $data['content'];
         $replace = array();
 
+        # 过滤宽度
+        if (strstr($data['content'], 'width:')) {
+            $content = preg_replace('/width:(.*?)px/', 'width:100%', $content);
+        }
+
         # 小程序
         if (strstr($data['content'], 'data-applet')) {
             preg_match_all('/<img(.*?)data-applet="(.*?)" \/>/', $content, $matches);