[Bps-public-commit] RT-Extension-FeaturedTickets branch, master, updated. f6a5fd1753ea666f3f80cf1f6766d892a4e19d4a

? sunnavy sunnavy at bestpractical.com
Thu Jul 12 17:21:12 EDT 2018


The branch, master has been updated
       via  f6a5fd1753ea666f3f80cf1f6766d892a4e19d4a (commit)
      from  6cfc66bc56a57fe5d4bf4c4f4f03ea2e24733a4f (commit)

Summary of changes:
 html/NoAuth/Featured/index.html | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit f6a5fd1753ea666f3f80cf1f6766d892a4e19d4a
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jul 13 05:17:43 2018 +0800

    Fix double UTF-8 encoded issue in Details modal
    
    encode_json returns UTF-8 encoded string, which is not what we want
    here, switching to RT's EncodeJSON function could fix it.

diff --git a/html/NoAuth/Featured/index.html b/html/NoAuth/Featured/index.html
index 5d89a1a..f9b8526 100644
--- a/html/NoAuth/Featured/index.html
+++ b/html/NoAuth/Featured/index.html
@@ -1,5 +1,4 @@
 % use utf8;
-% use JSON qw(encode_json);
 
 <!doctype html>
 <html lang="en">
@@ -107,7 +106,7 @@
     </p>
 %   my $args = {'ticket_id' => $ticket->Id, 'Subject' => $ticket->Subject, 'Goal' => 'Goal: $' . ($ticket->FirstCustomFieldValue('Goal') ? $ticket->FirstCustomFieldValue('Goal') : 0), 'Description' => $ticket->FirstCustomFieldValue('Description'), 'Details' => $ticket->FirstCustomFieldValue('Details') };
     </div>
-    <button onclick="detailsClicked(<% encode_json( $args ) %>)" type="submit" class="featured-tickets-button-choose featured-tickets-button-page pure-button" value="<% $ticket->Id %>" name="ticket_id">Details</button>
+    <button onclick="detailsClicked(<% RT::Interface::Web::EncodeJSON( $args ) %>)" type="submit" class="featured-tickets-button-choose featured-tickets-button-page pure-button" value="<% $ticket->Id %>" name="ticket_id">Details</button>
 </div>
 %}
     </div> <!-- end pricing-tables -->

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


More information about the Bps-public-commit mailing list