summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 434e49da5..b529caf89 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -682,6 +682,14 @@ sub create {
return $var;
},
+ # preserve newline by converting them to <br>
+ html_br => sub {
+ my ($var) = @_;
+ $var = html_quote($var);
+ $var =~ s/\n/<br>/g;
+ return $var;
+ },
+
# Prevents line break on hyphens and whitespaces.
no_break => sub {
my ($var) = @_;