Skip to content

Commit 7ed34ac

Browse files
author
Marius Burkard
committed
- fixed regex for stripping <script> tags
- no entities on wordbook entries
1 parent c17ea82 commit 7ed34ac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

interface/lib/classes/tform_base.inc.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,8 @@ function getHTML($record, $tab, $action = 'NEW') {
473473
if(is_array($field['value'])) {
474474
foreach($field['value'] as $k => $v) {
475475
$selected = ($k == $val)?' SELECTED':'';
476-
if(isset($this->wordbook[$v]))
477-
$v = $this->wordbook[$v];
478-
$v = $app->functions->htmlentities($v);
476+
if(isset($this->wordbook[$v])) $v = $this->wordbook[$v];
477+
else $v = $app->functions->htmlentities($v);
479478
$out .= "<option value='$k'$selected>".$this->lng($v)."</option>\r\n";
480479
}
481480
}
@@ -914,7 +913,7 @@ function filterField($field_name, $field_value, $filters, $filter_event) {
914913
$returnval = preg_replace('/\s+/', '', $returnval);
915914
break;
916915
case 'STRIPTAGS':
917-
$returnval = strip_tags(preg_replace('/<script[^>]*>/is', '', $returnval));
916+
$returnval = strip_tags(preg_replace('/<script[^>]*?>.*?<\/script>/is', '', $returnval));
918917
break;
919918
case 'STRIPNL':
920919
$returnval = str_replace(array("\n","\r"),'', $returnval);

0 commit comments

Comments
 (0)