Skip to content
Snippets Groups Projects

fix nl2br

Merged 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
Please register or sign in to reply
Loading