How to convert multi-line text (including newline characters) in a template to an HTML paragraph or `<br/>` tag for display?
In website content operation, we often encounter such situations: the background text input box allows users to enter multiple lines of text, such as article summaries, product descriptions, contact addresses, and so on.When these multi-line text containing line breaks are displayed in a website front-end template, if output directly, we will find that the original line breaks do not take effect, and all the text is squeezed into one line.This is because the browser defaults to merging consecutive whitespace characters (including newline characters) into a single space.