Преглед изворни кода

#781 Plain text dashlet shown on one single line

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2875 a333f486-631f-4898-b8df-5754b55c2be0
romainq пре 11 година
родитељ
комит
8e78d4336a
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      application/dashlet.class.inc.php

+ 1 - 0
application/dashlet.class.inc.php

@@ -355,6 +355,7 @@ class DashletPlainText extends Dashlet
 	public function Render($oPage, $bEditMode = false, $aExtraParams = array())
 	{
 		$sText = htmlentities($this->aProperties['text'], ENT_QUOTES, 'UTF-8');
+		$sText = str_replace(array("\r\n", "\n", "\r"), "<br/>", $sText);
 
 		$sId = 'plaintext_'.($bEditMode? 'edit_' : '').$this->sId;
 		$oPage->add('<div id="'.$sId.'" class="dashlet-content">'.$sText.'</div>');