WordPress.org

Make WordPress Core

Ticket #44764: 44764.1.diff

File 44764.1.diff, 1.0 KB (added by abdullahramzan, 2 years ago)

Slash Fix

  • wp-includes/js/wp-api.js

    diff --git a/wp-includes/js/wp-api.js b/wp-includes/js/wp-api.js
    index 9ac12fe..6a884de 100644
    a b  
    109109                //              1 YYYY                2 MM       3 DD           4 HH    5 mm       6 ss        7 msec        8 Z 9 ±    10 tzHH    11 tzmm
    110110                if ( ( struct = /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec( date ) ) ) {
    111111
    112                         // Avoid NaN timestamps caused by “undefined” values being passed to Date.UTC.
     112                        // Avoid NaN timestamps caused by “undefinedâ€? values being passed to Date.UTC.
    113113                        for ( i = 0; ( k = numericKeys[i] ); ++i ) {
    114114                                struct[k] = +struct[k] || 0;
    115115                        }
     
    141141        wp.api.utils.getRootUrl = function() {
    142142                return window.location.origin ?
    143143                        window.location.origin + '/' :
    144                         window.location.protocol + '/' + window.location.host + '/';
     144                        window.location.protocol + '//' + window.location.host + '/';
    145145        };
    146146
    147147        /**