|
@@ -49,13 +49,13 @@ 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>/is', $data['content'], $matches);
|
|
|
$replace = array();
|
|
|
$content = $data['content'];
|
|
|
- if (isset($matches[3][0]) && isset($matches[4][0])) {
|
|
|
- foreach ($matches[3] as $k => $v) {
|
|
|
+ if (isset($matches[4][0]) && isset($matches[5][0])) {
|
|
|
+ foreach ($matches[4] as $k => $v) {
|
|
|
$content = str_replace($matches[0][$k], '{replace}'.$k.'{replace}', $content);
|
|
|
- if ($matches[4][$k] == 'video/lib/core.vod') {
|
|
|
+ if ($matches[5][$k] == 'video/lib/core.vod') {
|
|
|
$method = 'video/lib/vod';
|
|
|
$type = 2;
|
|
|
} else {
|