[freeside-commits] branch FREESIDE_4_BRANCH updated. 9cb2c2f0b06e33b6c4bceb693267f206ca23e895

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


The branch, FREESIDE_4_BRANCH has been updated
       via  9cb2c2f0b06e33b6c4bceb693267f206ca23e895 (commit)
      from  f12ab9c8ffc1e0f611f40990399983896459743c (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 9cb2c2f0b06e33b6c4bceb693267f206ca23e895
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Sep 25 12:43:31 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