Explorar o código

#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 %!s(int64=11) %!d(string=hai) anos
pai
achega
8e78d4336a
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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>');