Skip to content
Snippets Groups Projects
Commit f574f5a1 authored by Uma's avatar Uma
Browse files

Merge branch 'description_fieldValue' into 'master'

Fixes #1438 Textarea fields data save

See merge request !702
parents dea83013 5feb639f
No related branches found
No related tags found
No related merge requests found
......@@ -16,14 +16,13 @@ class Vtiger_Text_UIType extends Vtiger_Base_UIType {
* @return <Object>
*/
public function getDisplayValue($value, $record=false, $recordInstance = false,$removeTags = false) {
//This API replaces newlines to html br tags, and spaces with &nbsp;
// It should not replace spaces within html tags
$value = decode_html(preg_replace('/\r\n|\r|\n|&NewLine;|&amp;NewLine;/','<br>',$value));
if($removeTags){
$value = strip_tags($value,'<br>');
}
$value = purifyHtmlEventAttributes($value, true);
return $value;
if(in_array($this->get('field')->getFieldName(),array('signature','commentcontent'))) {
return $value;
}
if($removeTags){
$value = strip_tags($value,'<br>');
}
return nl2br(purifyHtmlEventAttributes($value, true));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment