Skip to content

fix nl2br

nd requested to merge github/fork/spahan/fix_newlines into master

Created by: spahan

The splitting was done incorrect. It split only if 2 newlines (or \n\r since this are 2 chars in the set, but not matched on '\n\r'). The regular expression from the snippet at https://jinja.palletsprojects.com/en/2.10.x/api/#custom-filters was intended to make paragraphes from text where 2 newlines shall create a new paragraph. the replacing of newlines inside the paragraph was done using a replace.

For some reason, this worked in the comment field, but not in the address field.

Merge request reports