summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-08-04 18:24:15 +0200
committerDylan William Hardison <dylan@hardison.net>2018-08-04 18:24:15 +0200
commitf44392e8cdbea85ac308b2472f813ee605ebae4b (patch)
tree6e7adaf99a0e5a43eb1bf5a0d673d86b60f34f99 /Bugzilla/Template.pm
parent5be3a7fd0061aa0bc3059e09079741873b9b833f (diff)
parent4528b21bc922f8b1e0ba8581d230a492aa43c9cf (diff)
downloadbugzilla-f44392e8cdbea85ac308b2472f813ee605ebae4b.tar.gz
bugzilla-f44392e8cdbea85ac308b2472f813ee605ebae4b.tar.xz
Merge branch 'mojo-poc'
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index d4a5b15dc..cdeb54a50 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -12,6 +12,7 @@ use 5.10.1;
use strict;
use warnings;
+use Bugzilla::Logging;
use Bugzilla::Template::PreloadProvider;
use Bugzilla::Bug;
use Bugzilla::Constants;
@@ -565,13 +566,8 @@ sub create {
PRE_CHOMP => 1,
TRIM => 1,
- # Bugzilla::Template::Plugin::Hook uses the absolute (in mod_perl)
- # or relative (in mod_cgi) paths of hook files to explicitly compile
- # a specific file. Also, these paths may be absolute at any time
- # if a packager has modified bz_locations() to contain absolute
- # paths.
ABSOLUTE => 1,
- RELATIVE => $ENV{SERVER_SOFTWARE} ? 0 : 1,
+ RELATIVE => 0,
# Only use an on-disk template cache if we're running as the web
# server. This ensures the permissions of the cache remain correct.
@@ -584,7 +580,7 @@ sub create {
# Initialize templates (f.e. by loading plugins like Hook).
PRE_PROCESS => ["global/initialize.none.tmpl"],
- ENCODING => Bugzilla->params->{'utf8'} ? 'UTF-8' : undef,
+ ENCODING => 'UTF-8',
# Functions for processing text within templates in various ways.
# IMPORTANT! When adding a filter here that does not override a
@@ -624,6 +620,7 @@ sub create {
# and newlines/carriage returns escaped for use in JS strings.
js => sub {
my ($var) = @_;
+ no warnings 'utf8';
$var =~ s/([\\\'\"\/])/\\$1/g;
$var =~ s/\n/\\n/g;
$var =~ s/\r/\\r/g;
@@ -639,6 +636,7 @@ sub create {
# for details.
json => sub {
my ($var) = @_;
+ no warnings 'utf8';
$var =~ s/([\\\"\/])/\\$1/g;
$var =~ s/\n/\\n/g;
$var =~ s/\r/\\r/g;