From 228d0171b07879ce7a585c87aa5580237df74842 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 5 Sep 2017 18:30:02 -0700 Subject: [PATCH] if a single entry has bad UTF-8 chars, error out on that entry only instead of the whole conf page --- httemplate/config/config-view.cgi | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi index a52c1e97a..7b2e55a55 100644 --- a/httemplate/config/config-view.cgi +++ b/httemplate/config/config-view.cgi @@ -200,11 +200,15 @@ invoice language options: -
<% encode_entities(join("\n",
-     map { length($_) > 88 ? substr($_,0,88).'...' : $_ }
-         $conf->config($i->key, $agentnum)
-   ) )
-%>
+ +% my $escaped = eval { encode_entities(join("\n", +% map { length($_) > 88 ? substr($_,0,88).'...' : $_ } +% $conf->config($i->key, $agentnum) +% ) ); +% }; +% $escaped = $@ ? '('.encode_entities($@).')' : $escaped; +
<% $escaped %>
+ -- 2.11.0