[rt-users] RT Wikitext CF and newline character processing
skupko.sk at gmail.com
Mon May 23 07:30:35 EDT 2016
just dig into the Wikitext CF processing. Configured the RT and
CKEditor using the wikia how-to  with some additional changes to
Just discovered one issue with the displaying the Wikitext CF via Web interface.
CKEditor add <br /> on every newline by default (didn't find the
possibility to suppress that by configuration option) and the RT does
replacement of every newline character '\n' in CF value by '<br>'
string (found in /opt/rt4/lib/RT/Interface/Web.pm in
There are two ways to get it solved:
1) let CKEditor not to send <br \> tag to RT
2) let RT not to replace \n by <br>
Some advanced output filtering rules should be written.
Looks like it is possible to disable the replacement by setting
'Escape' argument to 0, but not sure how to do that for Wikitext CF
only (/opt/rt4/share/html/Elements/ShowCustomFieldWikitext seems to be
the proper place for that).
Other workaround could be to call ScrubHTML subroutine defined in
Web.pm with disablement of the 'br' tag for Wikitext CF.
Any other thoughts or did somebody solve this issue already (other
than the styling change)?
"testxy<br />\ntestza" is the text in RT's DB
"testxy<br><br />testza" is the RT's HTML output
More information about the rt-users