LP 1884657 Followup user/jboyer/lp1884657_signoff
authorJason Boyer <JBoyer@equinoxinitiative.org>
Fri, 4 Sep 2020 12:13:55 +0000 (08:13 -0400)
committerJason Boyer <JBoyer@equinoxinitiative.org>
Fri, 4 Sep 2020 12:13:55 +0000 (08:13 -0400)
Run all of the display data through the 'html' filter and change the
email into a live link.

Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/templates/opac/myopac/prefs.tt2

index 4065e24..590c5c2 100644 (file)
@@ -32,7 +32,7 @@ sub prepare_extended_user_info {
     $self->ctx->{user} = $self->editor->retrieve_actor_user([
         $self->ctx->{user}->id,
         {
-            flesh => 2,
+            flesh => 1,
             flesh_fields => {
                 au => [qw/card home_ou addresses ident_type billing_address waiver_entries/, @extra_flesh],
                 "aou" => ["billing_address"]
index b30f374..f2444fa 100644 (file)
             <tr>
                 <td class='color_4 light_border'>[% l("Home Library") %]</td>
                 <td class='light_border'>
-                    [% ctx.get_aou(ctx.user.home_ou.parent_ou).name %]<br/>
+                    [% ctx.get_aou(ctx.user.home_ou.parent_ou).name | html %]<br/>
                     [% ctx.user.home_ou.name | html %]<br/>
-                    [% ctx.user.home_ou.billing_address.street1 %]<br/>
-                    [% IF ctx.user.home_ou.billing_address.street2; ctx.user.home_ou.billing_address.street2 _ "<br/>"; END %]
-                    [% ctx.user.home_ou.billing_address.city %], [% ctx.user.home_ou.billing_address.state %] 
-                    [% ctx.user.home_ou.billing_address.post_code %]<br/>
+                    [% ctx.user.home_ou.billing_address.street1 | html %]<br/>
+                    [% IF ctx.user.home_ou.billing_address.street2; ctx.user.home_ou.billing_address.street2 | html; "<br/>"; END %]
+                    [% ctx.user.home_ou.billing_address.city | html %], [% ctx.user.home_ou.billing_address.state | html %] 
+                    [% ctx.user.home_ou.billing_address.post_code | html %]<br/>
                     <br/>
 
-                    [% IF ctx.user.home_ou.phone; ctx.user.home_ou.phone _ "<br/>"; END %]
+                    [% IF ctx.user.home_ou.phone; ctx.user.home_ou.phone | html; "<br/>"; END %]
                     
-                    [% IF ctx.user.home_ou.email; ctx.user.home_ou.email _ "<br/>"; END %]
+                    [% IF ctx.user.home_ou.email; '<a href="mailto:'; ctx.user.home_ou.email | html; '">'; ctx.user.home_ou.email | html; "</a><br/>"; END %]
                     [% lib_url = ctx.get_org_setting(ctx.user.home_ou.id, 'lib.info_url');
                         IF lib_url;
-                            '<a href="'; lib_url | html; '" property="url">'; lib_url; '</a>';
+                            '<a href="'; lib_url | html; '" property="url">'; lib_url | html;  '</a>';
                         END;
                     %]
                 </td>