[wp-trac] [WordPress Trac] #43438: Add filters and Ajax support for personal data export

WordPress Trac noreply at wordpress.org
Tue May 1 11:08:57 UTC 2018


#43438: Add filters and Ajax support for personal data export
-----------------------------------------------+-----------------------
 Reporter:  azaozz                             |       Owner:  desrosj
     Type:  enhancement                        |      Status:  assigned
 Priority:  normal                             |   Milestone:  4.9.6
Component:  General                            |     Version:
 Severity:  normal                             |  Resolution:
 Keywords:  gdpr needs-unit-tests needs-patch  |     Focuses:
-----------------------------------------------+-----------------------

Comment (by birgire):

 An additional important thing here is that we need to sanitize the
 exporter/eraser friendly name.

 Here's an example:


 {{{
 wp_send_json_error(
         sprintf(
                 /* translators: %s: exporter friendly name */
                 __( 'Exporter does not include a callback: %s.' ),
                 $exporter['exporter_friendly_name']
         )
 );

 }}}

 The {{{wp_send_json_error()}}} is a wrapper for {{{wp_send_json()}}} that
 uses {{{wp_encode_json()}}}.

 What comes to mind are {{{esc_js()}}} and {{{wp_encode_json()}}}, but I'm
 thinking {{{sanitize_text_field()}}} on
 {{{$exporter['exporter_friendly_name']}}} should do it here.

 What do you think?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43438#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list