diff --git a/etemplate/inc/class.bo_tracking.inc.php b/etemplate/inc/class.bo_tracking.inc.php index edd5edc15e..bf8c842cff 100644 --- a/etemplate/inc/class.bo_tracking.inc.php +++ b/etemplate/inc/class.bo_tracking.inc.php @@ -127,6 +127,12 @@ class bo_tracking * @var html */ var $html; + /** + * Should the class allow html content (for notifications) + * + * @var boolean + */ + var $html_content_allow = false; /** * Constructor @@ -668,7 +674,7 @@ class bo_tracking if ($html_mail) { - $line = $this->html->htmlspecialchars($line); // XSS + if (!$this->html_content_allow) $line = $this->html->htmlspecialchars($line); // XSS $color = $modified ? 'red' : false; $size = $html_mail == 'medium' ? 'medium' : 'small'; @@ -688,7 +694,12 @@ class bo_tracking $bold = true; break; case 'multiline': - $line = nl2br($line); + // Only Convert nl2br on non-html content + $pos = strpos($line, ' $val) } break; case 'htmlarea': // Multiline formatted Text Input, size: {simple|extended|advanced},height,width,toolbar-expanded,upload-path - list($mode,$height,$width,$toolbar,$baseref) = explode(',',$cell_options); + list($mode,$height,$width,$toolbar,$baseref,$convertnl) = explode(',',$cell_options); + + if ($convertnl == 1) $value = nl2br($value); + if (!$readonly) { $mode = $mode ? $mode : 'simple'; @@ -1158,7 +1161,7 @@ foreach($sess as $key => $val) } else { - $html .= $this->html->div($this->html->activate_links($value),'style="overflow: auto; border: thin inset black; width='. $width. '; height='. $height. '"'); + $html .= $this->html->div($this->html->activate_links($value),'style="overflow: auto; width='. $width. '; height='. $height. '"'); } break; case 'checkbox':