Ticket #2857: 2857b.diff

File 2857b.diff, 1.2 KB (added by Nazgul, 6 years ago)
  • wp-includes/functions.php

     
    806806} 
    807807 
    808808function wp_nonce_url($actionurl, $action = -1) { 
    809         return add_query_arg('_wpnonce', wp_create_nonce($action), $actionurl); 
     809        return wp_specialchars(add_query_arg('_wpnonce', wp_create_nonce($action), $actionurl)); 
    810810} 
    811811 
    812812function wp_nonce_field($action = -1) { 
  • wp-includes/script-loader.php

     
    6262                        if ( !in_array($handle, $this->printed) && isset($this->scripts[$handle]) ) { 
    6363                                $ver = $this->scripts[$handle]->ver ? $this->scripts[$handle]->ver : $wp_db_version; 
    6464                                if ( isset($this->args[$handle]) ) 
    65                                         $ver .= '&' . $this->args[$handle]; 
     65                                        $ver .= '&' . $this->args[$handle]; 
    6666                                $src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_settings( 'siteurl' ) . $this->scripts[$handle]->src; 
    6767                                echo "<script type='text/javascript' src='$src?ver=$ver'></script>\n"; 
    6868                                $this->printed[] = $handle;