NewLine internal Velocitiy / html

Hello @all,
I would like to change the appearance of the following display:

Version 3.132 authored by Name on 2022/12/07 14:57

replace with:
Version 3.132 (NewLine)
authored by Name (NewLine)
on 2022/12/07 14:57

#set ($versionInfo = $escapetool.xml($services.localization.render(‘export.pdf.templates.default.versionInfo’, [$tdoc.version, ‘author’, $xwiki.formatDate($tdoc.date)])))
<

$versionInfo.replace(‘author’, “#displayUser($tdoc.authorReference {‘useInlineHTML’: true})”)

Tried as syntax \ \n or <br>

How can I get a line break?

Many thank
TBC

As your snippet didn’t work for me I transformed it to this:

{{velocity}}
#set ($versionInfo = $tdoc.version + " " + $tdoc.author + " " + $xwiki.formatDate($tdoc.date))

$versionInfo.replaceAll(" ", "
")
{{/velocity}}

This returns:

301.1
xwiki:XWiki.TestAccount
11.12.2022
15:13

I hereby replaced all " " by a real on the keyboard typed “return” inside the code.

Many thanks Simpel,

the problem why that one is not working with my snippet is that one is include html.
Complete Code:

{{velocity}}
{{html clean="false"}}
<h1>$escapetool.xml($tdoc.plainTitle)</h1>
#set ($versionInfo = $escapetool.xml($services.localization.render('export.pdf.templates.default.versionInfo',
  [$tdoc.version, '__author__', $xwiki.formatDate($tdoc.date)])))
<p>$versionInfo.replace('__author__', "#displayUser($tdoc.authorReference {'useInlineHTML': true})")</p>
{{/html}}
{{/velocity}}

Without html it’s working.
So I need to find out how that one works. But many thanks and sorry if i don’t tell everything before

Cheers TBC