Permalink
Browse files

remove script tags from grid backend box rendering

  • Loading branch information...
EdwardBock committed Nov 20, 2018
1 parent 74fa7cf commit d4bfb6ac133b7a2b8f18a742f2fa7cab5e2899df
Showing with 18 additions and 5 deletions.
  1. +1 −5 classes/grid_html_box.php
  2. +17 −0 templates/frontend/grid-box-html-editmode.tpl.php
@@ -37,11 +37,7 @@ public function __construct() {
* @return string
*/
public function build($editmode) {
if($editmode && empty($this->content->html)) {
return t("Static HTML-Content");
} else {
return $this->content->html;
}
return $this->content->html;
}
/**
@@ -0,0 +1,17 @@
<?php
/**
* @author Palasthotel <rezeption@palasthotel.de>
* @copyright Copyright (c) 2014, Palasthotel
* @license http://www.gnu.org/licenses/gpl-2.0.html GPLv2
* @package Palasthotel\Grid
*/
?>
<div class="grid-box-editmode">
<?php
if( empty($this->content->html)) {
echo t("Static HTML-Content");
} else {
echo preg_replace('#<script(.*?)>(.*?)</script>#is', '', $this->content->html);
}
?>
</div>

0 comments on commit d4bfb6a

Please sign in to comment.