Make WordPress Core


Ignore:
Timestamp:
10/29/2020 06:00:58 PM (4 years ago)
Author:
desrosj
Message:

Coding standards: Modify escaping functions to avoid potential false positives.

Props xknown, zieladam, peterwilsoncc.
Merges [49375] to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/includes/template.php

    r49325 r49384  
    20282028addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    20292029function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
    2030 var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
    2031     pagenow = '<?php echo $current_screen->id; ?>',
    2032     typenow = '<?php echo $current_screen->post_type; ?>',
    2033     adminpage = '<?php echo $admin_body_class; ?>',
    2034     thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
    2035     decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
     2030var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
     2031    pagenow = '<?php echo esc_js( $current_screen->id ); ?>',
     2032    typenow = '<?php echo esc_js( $current_screen->post_type ); ?>',
     2033    adminpage = '<?php echo esc_js( $admin_body_class ); ?>',
     2034    thousandsSeparator = '<?php echo esc_js( $wp_locale->number_format['thousands_sep'] ); ?>',
     2035    decimalPoint = '<?php echo esc_js( $wp_locale->number_format['decimal_point'] ); ?>',
    20362036    isRtl = <?php echo (int) is_rtl(); ?>;
    20372037</script>
Note: See TracChangeset for help on using the changeset viewer.