From: Ivan Kohler Date: Wed, 6 Sep 2017 01:30:00 +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/?a=commitdiff_plain;h=cd5f689af969136fb11b017917a0d75aa0fb7808;p=freeside.git 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 edbda5ca9..b95697463 100644 --- a/httemplate/config/config-view.cgi +++ b/httemplate/config/config-view.cgi @@ -212,11 +212,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 %>
+