File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ class LongText extends AbstractMultiBaseType {
2424 * @return bool true if $mode could be satisfied
2525 */
2626 public function renderValue ($ value , \Doku_Renderer $ R , $ mode ) {
27- $ R ->cdata ($ this ->config ['prefix ' ] . $ value . $ this ->config ['postfix ' ]);
27+ if ($ mode === 'xhtml ' ) {
28+ $ valueWithBR = str_replace ("\n" , '<br> ' , hsc ($ value ));
29+ $ R ->doc .= hsc ($ this ->config ['prefix ' ]) . $ valueWithBR . hsc ($ this ->config ['postfix ' ]);
30+ } else {
31+ $ R ->cdata ($ this ->config ['prefix ' ] . $ value . $ this ->config ['postfix ' ]);
32+ }
2833 return true ;
2934 }
3035
@@ -39,7 +44,7 @@ public function validate($rawvalue) {
3944 $ rawvalue = cleanText ($ rawvalue );
4045 return $ rawvalue ;
4146 }
42-
47+
4348 /**
4449 * Use a text area for input
4550 *
You can’t perform that action at this time.
0 commit comments