mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Little change to allow mixed (ascii & html) widget, all controll by htmlarea
parameters
This commit is contained in:
parent
71fc139a31
commit
43d3ee1cf3
@ -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, '<br');
|
||||
if ($pos===false)
|
||||
{
|
||||
$line = nl2br($line);
|
||||
}
|
||||
break;
|
||||
case 'reply':
|
||||
$background = '#F1F1F1';
|
||||
|
@ -1140,7 +1140,10 @@ foreach($sess as $key => $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':
|
||||
|
Loading…
Reference in New Issue
Block a user