[freeside-commits] branch master updated. 636bd62e61bba10718df2f048d44fb475964eb66

Ivan ivan at 420.am
Sun Sep 25 12:43:30 PDT 2016


The branch, master has been updated
       via  636bd62e61bba10718df2f048d44fb475964eb66 (commit)
      from  0a5585fba67aaa55301fe585a75aae1106aea1e6 (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 636bd62e61bba10718df2f048d44fb475964eb66
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Sep 25 12:43:30 2016 -0700

    escape labels

diff --git a/httemplate/elements/select.html b/httemplate/elements/select.html
index 3a0dc5b..4460207 100644
--- a/httemplate/elements/select.html
+++ b/httemplate/elements/select.html
@@ -4,6 +4,7 @@
     field       => 'myfield', # NAME property
     curr_value  => 'foo',
     labels      => { # or 'option_labels'
+                     # note: these will be escaped for you, don't escape them
                      'AL' => 'Alabama',
                      'AK' => 'Alaska',
                      'AR' => 'Arkansas',
@@ -30,7 +31,7 @@
 <SELECT NAME          = "<% $opt{field} %>"
         ID            = "<% $opt{id} %>"
         previousValue = "<% $curr_value %>"
-        previousText  = "<% $labels->{$curr_value} || $curr_value %>"
+        previousText  = "<% $labels->{$curr_value} || $curr_value |h %>"
         <% $multiple %>
         <% $size %>
         <% $style %>
@@ -46,7 +47,7 @@
       <OPTION VALUE="<% $option %>"
               <% $opt{curr_value} eq $option ? 'SELECTED' : '' %>
       >
-        <% $labels->{$option} || $option %>
+        <% $labels->{$option} || $option |h %>
       </OPTION>
 
 %   }

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

Summary of changes:
 httemplate/elements/select.html |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list