瀏覽代碼

#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>');