[freeside-commits] branch master updated. 00f6a05e148ee90f04c9f38830cf9f1f601ab041

Ivan ivan at 420.am
Tue Sep 5 18:30:00 PDT 2017


The branch, master has been updated
       via  00f6a05e148ee90f04c9f38830cf9f1f601ab041 (commit)
      from  35ac50b0ff66fc78aaa11baf8ae0199280645b96 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 00f6a05e148ee90f04c9f38830cf9f1f601ab041
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Sep 5 18:29:58 2017 -0700

    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 b02ab1a..5f09b12 100644
--- a/httemplate/config/config-view.cgi
+++ b/httemplate/config/config-view.cgi
@@ -212,11 +212,15 @@ invoice language options:
 
             <tr>
               <td id="<% $agentnum.$i->key.$n %>" bgcolor="#ffffff">
-<font size="-2"><pre><% encode_entities(join("\n",
-     map { length($_) > 88 ? substr($_,0,88).'...' : $_ }
-         $conf->config($i->key, $agentnum)
-   ) )
-%></pre></font>
+
+% my $escaped = eval { encode_entities(join("\n",
+%                        map { length($_) > 88 ? substr($_,0,88).'...' : $_ }
+%                          $conf->config($i->key, $agentnum)
+%                      ) );
+%                    };
+% $escaped = $@ ? '('.encode_entities($@).')' : $escaped;
+<font size="-2"><pre><% $escaped %></pre></font>
+
               </td>
             </tr>
 

-----------------------------------------------------------------------

Summary of changes:
 httemplate/config/config-view.cgi |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list