|
@@ -53,7 +53,7 @@ class Article
|
|
|
|
|
|
if (strstr($data['content'], 'data-id')) {
|
|
|
# 视频
|
|
|
- preg_match_all('/<p(.*?)>(\s[^>]*)<img(.*?)data-id="(.*?)" data-key="(.*?)" \/>(\s[^>]*)<\/p>/is', $data['content'], $matches);
|
|
|
+ preg_match_all('/<p(.*?)>([\s]+)<img(.*?)data-id="(.*?)" data-key="(.*?)" \/>([\s]+)<\/p>/', $data['content'], $matches);
|
|
|
$replace = array();
|
|
|
$content = $data['content'];
|
|
|
if (isset($matches[4][0]) && isset($matches[5][0])) {
|
|
@@ -79,6 +79,7 @@ class Article
|
|
|
|
|
|
$content = explode('{replace}', $content);
|
|
|
$data['content_array'] = array();
|
|
|
+ //print_r($content);die;
|
|
|
foreach ($content as $k => $v) {
|
|
|
$v = trim($v);
|
|
|
if (is_numeric($v) && $v >= 0 && isset($replace[$v])) {
|