diff --git a/modules/Vtiger/uitypes/Text.php b/modules/Vtiger/uitypes/Text.php
index 054024feaf65d0df6407e816200055fbeb023bea..ccbe2f792f93b685461e35c5ed9b17a0a85c26a5 100644
--- a/modules/Vtiger/uitypes/Text.php
+++ b/modules/Vtiger/uitypes/Text.php
@@ -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));
 	}
     
     /**