diff --git a/common/behaviors/WidgetContentBehavior.php b/common/behaviors/WidgetContentBehavior.php new file mode 100644 index 0000000..d66fd3d --- /dev/null +++ b/common/behaviors/WidgetContentBehavior.php @@ -0,0 +1,30 @@ + 'tree', ], TimestampBehavior::class, + WidgetContentBehavior::class, ]; } diff --git a/common/modules/pages/views/page/view.php b/common/modules/pages/views/page/view.php index 0dbf6dd..11a55d8 100644 --- a/common/modules/pages/views/page/view.php +++ b/common/modules/pages/views/page/view.php @@ -29,7 +29,7 @@ $this->params['breadcrumbs'][] = $page->title; 'URI.SafeIframeRegexp'=>'%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%', ])) ?> --> - = preg_replace_callback('/\[\?= (.*) \?\]/gm', function ($m) { + + + = $page->content(Yii::$app->formatter->asHtml($page->content, [ + 'Attr.AllowedRel' => array('nofollow'), + 'HTML.SafeObject' => true, + 'Output.FlashCompat' => true, + 'HTML.SafeIframe' => true, + 'URI.SafeIframeRegexp'=>'%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%', + ]))?> diff --git a/frontend/web/themes/start/modules/pages/views/page/view.php b/frontend/web/themes/start/modules/pages/views/page/view.php index ddeca41..679a6a1 100644 --- a/frontend/web/themes/start/modules/pages/views/page/view.php +++ b/frontend/web/themes/start/modules/pages/views/page/view.php @@ -21,12 +21,7 @@ $this->params['breadcrumbs'][] = $page->title;