From: Ivan Kohler Date: Wed, 6 Sep 2017 01:30:02 +0000 (-0700) Subject: if a single entry has bad UTF-8 chars, error out on that entry only instead of the... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=228d0171b07879ce7a585c87aa5580237df74842 if a single entry has bad UTF-8 chars, error out on that entry only instead of the whole conf page --- 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 %>
+