2018-12-14 05:41:57 +01:00
this [ "wp" ] = this [ "wp" ] || { } ; this [ "wp" ] [ "url" ] =
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = "lbya" ) ;
2018-12-14 05:41:57 +01:00
/******/ } )
/************************************************************************/
/******/ ( {
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
/***/ "Bqip" :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var stringify = _ _webpack _require _ _ ( "i3/l" ) ;
var parse = _ _webpack _require _ _ ( "ZXuc" ) ;
var formats = _ _webpack _require _ _ ( "N4P5" ) ;
module . exports = {
formats : formats ,
parse : parse ,
stringify : stringify
} ;
/***/ } ) ,
/***/ "D8t3" :
2018-12-18 04:14:52 +01:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
"use strict" ;
2018-12-18 04:14:52 +01:00
var has = Object . prototype . hasOwnProperty ;
var hexTable = ( function ( ) {
var array = [ ] ;
for ( var i = 0 ; i < 256 ; ++ i ) {
array . push ( '%' + ( ( i < 16 ? '0' : '' ) + i . toString ( 16 ) ) . toUpperCase ( ) ) ;
2018-12-14 05:41:57 +01:00
}
2018-12-18 04:14:52 +01:00
return array ;
} ( ) ) ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
var compactQueue = function compactQueue ( queue ) {
while ( queue . length > 1 ) {
var item = queue . pop ( ) ;
var obj = item . obj [ item . prop ] ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
if ( Array . isArray ( obj ) ) {
var compacted = [ ] ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
for ( var j = 0 ; j < obj . length ; ++ j ) {
if ( typeof obj [ j ] !== 'undefined' ) {
compacted . push ( obj [ j ] ) ;
}
}
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
item . obj [ item . prop ] = compacted ;
}
}
} ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
var arrayToObject = function arrayToObject ( source , options ) {
var obj = options && options . plainObjects ? Object . create ( null ) : { } ;
for ( var i = 0 ; i < source . length ; ++ i ) {
if ( typeof source [ i ] !== 'undefined' ) {
obj [ i ] = source [ i ] ;
}
}
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
return obj ;
} ;
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
var merge = function merge ( target , source , options ) {
if ( ! source ) {
return target ;
}
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
if ( typeof source !== 'object' ) {
if ( Array . isArray ( target ) ) {
target . push ( source ) ;
} else if ( typeof target === 'object' ) {
if ( ( options && ( options . plainObjects || options . allowPrototypes ) ) || ! has . call ( Object . prototype , source ) ) {
target [ source ] = true ;
}
} else {
return [ target , source ] ;
}
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
return target ;
}
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
if ( typeof target !== 'object' ) {
return [ target ] . concat ( source ) ;
}
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
var mergeTarget = target ;
if ( Array . isArray ( target ) && ! Array . isArray ( source ) ) {
mergeTarget = arrayToObject ( target , options ) ;
}
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
if ( Array . isArray ( target ) && Array . isArray ( source ) ) {
source . forEach ( function ( item , i ) {
if ( has . call ( target , i ) ) {
if ( target [ i ] && typeof target [ i ] === 'object' ) {
target [ i ] = merge ( target [ i ] , item , options ) ;
} else {
target . push ( item ) ;
}
} else {
target [ i ] = item ;
}
} ) ;
return target ;
}
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
return Object . keys ( source ) . reduce ( function ( acc , key ) {
var value = source [ key ] ;
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
if ( has . call ( acc , key ) ) {
acc [ key ] = merge ( acc [ key ] , value , options ) ;
} else {
acc [ key ] = value ;
}
return acc ;
} , mergeTarget ) ;
} ;
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
var assign = function assignSingleSource ( target , source ) {
return Object . keys ( source ) . reduce ( function ( acc , key ) {
acc [ key ] = source [ key ] ;
return acc ;
} , target ) ;
} ;
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
var decode = function ( str , decoder , charset ) {
var strWithoutPlus = str . replace ( /\+/g , ' ' ) ;
if ( charset === 'iso-8859-1' ) {
// unescape never throws, no try...catch needed:
return strWithoutPlus . replace ( /%[0-9a-f]{2}/gi , unescape ) ;
}
// utf-8
try {
return decodeURIComponent ( strWithoutPlus ) ;
} catch ( e ) {
return strWithoutPlus ;
}
} ;
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
var encode = function encode ( str , defaultEncoder , charset ) {
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
// It has been adapted here for stricter adherence to RFC 3986
if ( str . length === 0 ) {
return str ;
}
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
var string = typeof str === 'string' ? str : String ( str ) ;
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
if ( charset === 'iso-8859-1' ) {
return escape ( string ) . replace ( /%u[0-9a-f]{4}/gi , function ( $0 ) {
return '%26%23' + parseInt ( $0 . slice ( 2 ) , 16 ) + '%3B' ;
} ) ;
}
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
var out = '' ;
for ( var i = 0 ; i < string . length ; ++ i ) {
var c = string . charCodeAt ( i ) ;
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
if (
c === 0x2D // -
|| c === 0x2E // .
|| c === 0x5F // _
|| c === 0x7E // ~
|| ( c >= 0x30 && c <= 0x39 ) // 0-9
|| ( c >= 0x41 && c <= 0x5A ) // a-z
|| ( c >= 0x61 && c <= 0x7A ) // A-Z
) {
out += string . charAt ( i ) ;
continue ;
}
if ( c < 0x80 ) {
out = out + hexTable [ c ] ;
continue ;
}
if ( c < 0x800 ) {
out = out + ( hexTable [ 0xC0 | ( c >> 6 ) ] + hexTable [ 0x80 | ( c & 0x3F ) ] ) ;
continue ;
}
if ( c < 0xD800 || c >= 0xE000 ) {
out = out + ( hexTable [ 0xE0 | ( c >> 12 ) ] + hexTable [ 0x80 | ( ( c >> 6 ) & 0x3F ) ] + hexTable [ 0x80 | ( c & 0x3F ) ] ) ;
continue ;
}
i += 1 ;
c = 0x10000 + ( ( ( c & 0x3FF ) << 10 ) | ( string . charCodeAt ( i ) & 0x3FF ) ) ;
out += hexTable [ 0xF0 | ( c >> 18 ) ]
+ hexTable [ 0x80 | ( ( c >> 12 ) & 0x3F ) ]
+ hexTable [ 0x80 | ( ( c >> 6 ) & 0x3F ) ]
+ hexTable [ 0x80 | ( c & 0x3F ) ] ;
}
return out ;
} ;
var compact = function compact ( value ) {
var queue = [ { obj : { o : value } , prop : 'o' } ] ;
var refs = [ ] ;
for ( var i = 0 ; i < queue . length ; ++ i ) {
var item = queue [ i ] ;
var obj = item . obj [ item . prop ] ;
var keys = Object . keys ( obj ) ;
for ( var j = 0 ; j < keys . length ; ++ j ) {
var key = keys [ j ] ;
var val = obj [ key ] ;
if ( typeof val === 'object' && val !== null && refs . indexOf ( val ) === - 1 ) {
queue . push ( { obj : obj , prop : key } ) ;
refs . push ( val ) ;
}
}
}
compactQueue ( queue ) ;
return value ;
} ;
var isRegExp = function isRegExp ( obj ) {
return Object . prototype . toString . call ( obj ) === '[object RegExp]' ;
} ;
var isBuffer = function isBuffer ( obj ) {
if ( obj === null || typeof obj === 'undefined' ) {
return false ;
}
return ! ! ( obj . constructor && obj . constructor . isBuffer && obj . constructor . isBuffer ( obj ) ) ;
} ;
var combine = function combine ( a , b ) {
return [ ] . concat ( a , b ) ;
} ;
module . exports = {
arrayToObject : arrayToObject ,
assign : assign ,
combine : combine ,
compact : compact ,
decode : decode ,
encode : encode ,
isBuffer : isBuffer ,
isRegExp : isRegExp ,
merge : merge
} ;
/***/ } ) ,
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
/***/ "N4P5" :
2018-12-18 04:14:52 +01:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var replace = String . prototype . replace ;
var percentTwenties = /%20/g ;
module . exports = {
'default' : 'RFC3986' ,
formatters : {
RFC1738 : function ( value ) {
return replace . call ( value , percentTwenties , '+' ) ;
} ,
RFC3986 : function ( value ) {
return value ;
}
} ,
RFC1738 : 'RFC1738' ,
RFC3986 : 'RFC3986'
} ;
/***/ } ) ,
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
/***/ "ZXuc" :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2018-12-18 04:14:52 +01:00
"use strict" ;
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var utils = _ _webpack _require _ _ ( "D8t3" ) ;
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var has = Object . prototype . hasOwnProperty ;
2018-12-17 05:52:00 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var defaults = {
allowDots : false ,
allowPrototypes : false ,
arrayLimit : 20 ,
charset : 'utf-8' ,
charsetSentinel : false ,
decoder : utils . decode ,
delimiter : '&' ,
depth : 5 ,
ignoreQueryPrefix : false ,
interpretNumericEntities : false ,
parameterLimit : 1000 ,
parseArrays : true ,
plainObjects : false ,
strictNullHandling : false
} ;
2018-12-17 05:52:00 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var interpretNumericEntities = function ( str ) {
return str . replace ( /&#(\d+);/g , function ( $0 , numberStr ) {
return String . fromCharCode ( parseInt ( numberStr , 10 ) ) ;
} ) ;
} ;
2018-12-17 05:52:00 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// This is what browsers will submit when the ✓ character occurs in an
// application/x-www-form-urlencoded body and the encoding of the page containing
// the form is iso-8859-1, or when the submitted form has an accept-charset
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
// the ✓ character, such as us-ascii.
var isoSentinel = 'utf8=%26%2310003%3B' ; // encodeURIComponent('✓')
2018-12-17 05:52:00 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
var charsetSentinel = 'utf8=%E2%9C%93' ; // encodeURIComponent('✓')
2018-12-17 05:52:00 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var parseValues = function parseQueryStringValues ( str , options ) {
var obj = { } ;
var cleanStr = options . ignoreQueryPrefix ? str . replace ( /^\?/ , '' ) : str ;
var limit = options . parameterLimit === Infinity ? undefined : options . parameterLimit ;
var parts = cleanStr . split ( options . delimiter , limit ) ;
var skipIndex = - 1 ; // Keep track of where the utf8 sentinel was found
var i ;
2018-12-17 05:52:00 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var charset = options . charset ;
if ( options . charsetSentinel ) {
for ( i = 0 ; i < parts . length ; ++ i ) {
if ( parts [ i ] . indexOf ( 'utf8=' ) === 0 ) {
if ( parts [ i ] === charsetSentinel ) {
charset = 'utf-8' ;
} else if ( parts [ i ] === isoSentinel ) {
charset = 'iso-8859-1' ;
}
skipIndex = i ;
i = parts . length ; // The eslint settings do not allow break;
}
}
}
2018-12-17 05:52:00 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
for ( i = 0 ; i < parts . length ; ++ i ) {
if ( i === skipIndex ) {
continue ;
}
var part = parts [ i ] ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var bracketEqualsPos = part . indexOf ( ']=' ) ;
var pos = bracketEqualsPos === - 1 ? part . indexOf ( '=' ) : bracketEqualsPos + 1 ;
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var key , val ;
if ( pos === - 1 ) {
key = options . decoder ( part , defaults . decoder , charset ) ;
val = options . strictNullHandling ? null : '' ;
} else {
key = options . decoder ( part . slice ( 0 , pos ) , defaults . decoder , charset ) ;
val = options . decoder ( part . slice ( pos + 1 ) , defaults . decoder , charset ) ;
}
2018-12-14 12:02:53 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( val && options . interpretNumericEntities && charset === 'iso-8859-1' ) {
val = interpretNumericEntities ( val ) ;
}
if ( has . call ( obj , key ) ) {
obj [ key ] = utils . combine ( obj [ key ] , val ) ;
} else {
obj [ key ] = val ;
}
}
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return obj ;
} ;
2018-12-14 12:02:53 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var parseObject = function ( chain , val , options ) {
var leaf = val ;
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
for ( var i = chain . length - 1 ; i >= 0 ; -- i ) {
var obj ;
var root = chain [ i ] ;
2018-12-14 12:02:53 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( root === '[]' && options . parseArrays ) {
obj = [ ] . concat ( leaf ) ;
} else {
obj = options . plainObjects ? Object . create ( null ) : { } ;
var cleanRoot = root . charAt ( 0 ) === '[' && root . charAt ( root . length - 1 ) === ']' ? root . slice ( 1 , - 1 ) : root ;
var index = parseInt ( cleanRoot , 10 ) ;
if ( ! options . parseArrays && cleanRoot === '' ) {
obj = { 0 : leaf } ;
} else if (
! isNaN ( index )
&& root !== cleanRoot
&& String ( index ) === cleanRoot
&& index >= 0
&& ( options . parseArrays && index <= options . arrayLimit )
) {
obj = [ ] ;
obj [ index ] = leaf ;
} else {
obj [ cleanRoot ] = leaf ;
}
}
2018-12-14 12:02:53 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
leaf = obj ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return leaf ;
} ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var parseKeys = function parseQueryStringKeys ( givenKey , val , options ) {
if ( ! givenKey ) {
return ;
}
2018-12-14 05:53:54 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// Transform dot notation to bracket notation
var key = options . allowDots ? givenKey . replace ( /\.([^.[]+)/g , '[$1]' ) : givenKey ;
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// The regex chunks
2018-12-14 12:02:53 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var brackets = /(\[[^[\]]*])/ ;
var child = /(\[[^[\]]*])/g ;
2019-03-07 10:09:59 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// Get the parent
2019-03-07 10:09:59 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var segment = brackets . exec ( key ) ;
var parent = segment ? key . slice ( 0 , segment . index ) : key ;
2019-01-04 20:38:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// Stash the parent if it exists
2019-01-04 20:38:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var keys = [ ] ;
if ( parent ) {
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
if ( ! options . plainObjects && has . call ( Object . prototype , parent ) ) {
if ( ! options . allowPrototypes ) {
return ;
}
}
2019-01-04 20:38:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
keys . push ( parent ) ;
}
2019-01-04 20:38:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// Loop through children appending to the array until we hit depth
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var i = 0 ;
while ( ( segment = child . exec ( key ) ) !== null && i < options . depth ) {
i += 1 ;
if ( ! options . plainObjects && has . call ( Object . prototype , segment [ 1 ] . slice ( 1 , - 1 ) ) ) {
if ( ! options . allowPrototypes ) {
return ;
}
}
keys . push ( segment [ 1 ] ) ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// If there's a remainder, just add whatever is left
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( segment ) {
keys . push ( '[' + key . slice ( segment . index ) + ']' ) ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return parseObject ( keys , val , options ) ;
} ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
module . exports = function ( str , opts ) {
var options = opts ? utils . assign ( { } , opts ) : { } ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( options . decoder !== null && options . decoder !== undefined && typeof options . decoder !== 'function' ) {
throw new TypeError ( 'Decoder has to be a function.' ) ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
options . ignoreQueryPrefix = options . ignoreQueryPrefix === true ;
options . delimiter = typeof options . delimiter === 'string' || utils . isRegExp ( options . delimiter ) ? options . delimiter : defaults . delimiter ;
options . depth = typeof options . depth === 'number' ? options . depth : defaults . depth ;
options . arrayLimit = typeof options . arrayLimit === 'number' ? options . arrayLimit : defaults . arrayLimit ;
options . parseArrays = options . parseArrays !== false ;
options . decoder = typeof options . decoder === 'function' ? options . decoder : defaults . decoder ;
options . allowDots = typeof options . allowDots === 'undefined' ? defaults . allowDots : ! ! options . allowDots ;
options . plainObjects = typeof options . plainObjects === 'boolean' ? options . plainObjects : defaults . plainObjects ;
options . allowPrototypes = typeof options . allowPrototypes === 'boolean' ? options . allowPrototypes : defaults . allowPrototypes ;
options . parameterLimit = typeof options . parameterLimit === 'number' ? options . parameterLimit : defaults . parameterLimit ;
options . strictNullHandling = typeof options . strictNullHandling === 'boolean' ? options . strictNullHandling : defaults . strictNullHandling ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( typeof options . charset !== 'undefined' && options . charset !== 'utf-8' && options . charset !== 'iso-8859-1' ) {
throw new Error ( 'The charset option must be either utf-8, iso-8859-1, or undefined' ) ;
}
if ( typeof options . charset === 'undefined' ) {
options . charset = defaults . charset ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( str === '' || str === null || typeof str === 'undefined' ) {
return options . plainObjects ? Object . create ( null ) : { } ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var tempObj = typeof str === 'string' ? parseValues ( str , options ) : str ;
var obj = options . plainObjects ? Object . create ( null ) : { } ;
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// Iterate over the keys and setup the new object
2019-03-07 10:09:59 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var keys = Object . keys ( tempObj ) ;
for ( var i = 0 ; i < keys . length ; ++ i ) {
var key = keys [ i ] ;
var newObj = parseKeys ( key , tempObj [ key ] , options ) ;
obj = utils . merge ( obj , newObj , options ) ;
}
return utils . compact ( obj ) ;
} ;
2018-12-14 05:41:57 +01:00
/***/ } ) ,
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
/***/ "i3/l" :
2018-12-14 05:41:57 +01:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var utils = _ _webpack _require _ _ ( "D8t3" ) ;
var formats = _ _webpack _require _ _ ( "N4P5" ) ;
2018-12-14 05:41:57 +01:00
var arrayPrefixGenerators = {
brackets : function brackets ( prefix ) { // eslint-disable-line func-name-matching
return prefix + '[]' ;
} ,
indices : function indices ( prefix , key ) { // eslint-disable-line func-name-matching
return prefix + '[' + key + ']' ;
} ,
repeat : function repeat ( prefix ) { // eslint-disable-line func-name-matching
return prefix ;
}
} ;
var isArray = Array . isArray ;
var push = Array . prototype . push ;
var pushToArray = function ( arr , valueOrArray ) {
push . apply ( arr , isArray ( valueOrArray ) ? valueOrArray : [ valueOrArray ] ) ;
} ;
var toISO = Date . prototype . toISOString ;
var defaults = {
addQueryPrefix : false ,
allowDots : false ,
charset : 'utf-8' ,
charsetSentinel : false ,
delimiter : '&' ,
encode : true ,
encoder : utils . encode ,
encodeValuesOnly : false ,
// deprecated
indices : false ,
serializeDate : function serializeDate ( date ) { // eslint-disable-line func-name-matching
return toISO . call ( date ) ;
} ,
skipNulls : false ,
strictNullHandling : false
} ;
var stringify = function stringify ( // eslint-disable-line func-name-matching
object ,
prefix ,
generateArrayPrefix ,
strictNullHandling ,
skipNulls ,
encoder ,
filter ,
sort ,
allowDots ,
serializeDate ,
formatter ,
encodeValuesOnly ,
charset
) {
var obj = object ;
if ( typeof filter === 'function' ) {
obj = filter ( prefix , obj ) ;
} else if ( obj instanceof Date ) {
obj = serializeDate ( obj ) ;
}
if ( obj === null ) {
if ( strictNullHandling ) {
return encoder && ! encodeValuesOnly ? encoder ( prefix , defaults . encoder , charset ) : prefix ;
}
obj = '' ;
}
if ( typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils . isBuffer ( obj ) ) {
if ( encoder ) {
var keyValue = encodeValuesOnly ? prefix : encoder ( prefix , defaults . encoder , charset ) ;
return [ formatter ( keyValue ) + '=' + formatter ( encoder ( obj , defaults . encoder , charset ) ) ] ;
}
return [ formatter ( prefix ) + '=' + formatter ( String ( obj ) ) ] ;
}
var values = [ ] ;
if ( typeof obj === 'undefined' ) {
return values ;
}
var objKeys ;
if ( Array . isArray ( filter ) ) {
objKeys = filter ;
} else {
var keys = Object . keys ( obj ) ;
objKeys = sort ? keys . sort ( sort ) : keys ;
}
for ( var i = 0 ; i < objKeys . length ; ++ i ) {
var key = objKeys [ i ] ;
if ( skipNulls && obj [ key ] === null ) {
continue ;
}
if ( Array . isArray ( obj ) ) {
pushToArray ( values , stringify (
obj [ key ] ,
generateArrayPrefix ( prefix , key ) ,
generateArrayPrefix ,
strictNullHandling ,
skipNulls ,
encoder ,
filter ,
sort ,
allowDots ,
serializeDate ,
formatter ,
encodeValuesOnly ,
charset
) ) ;
} else {
pushToArray ( values , stringify (
obj [ key ] ,
prefix + ( allowDots ? '.' + key : '[' + key + ']' ) ,
generateArrayPrefix ,
strictNullHandling ,
skipNulls ,
encoder ,
filter ,
sort ,
allowDots ,
serializeDate ,
formatter ,
encodeValuesOnly ,
charset
) ) ;
}
}
return values ;
} ;
module . exports = function ( object , opts ) {
var obj = object ;
var options = opts ? utils . assign ( { } , opts ) : { } ;
if ( options . encoder !== null && options . encoder !== undefined && typeof options . encoder !== 'function' ) {
throw new TypeError ( 'Encoder has to be a function.' ) ;
}
var delimiter = typeof options . delimiter === 'undefined' ? defaults . delimiter : options . delimiter ;
var strictNullHandling = typeof options . strictNullHandling === 'boolean' ? options . strictNullHandling : defaults . strictNullHandling ;
var skipNulls = typeof options . skipNulls === 'boolean' ? options . skipNulls : defaults . skipNulls ;
var encode = typeof options . encode === 'boolean' ? options . encode : defaults . encode ;
var encoder = typeof options . encoder === 'function' ? options . encoder : defaults . encoder ;
var sort = typeof options . sort === 'function' ? options . sort : null ;
var allowDots = typeof options . allowDots === 'undefined' ? defaults . allowDots : ! ! options . allowDots ;
var serializeDate = typeof options . serializeDate === 'function' ? options . serializeDate : defaults . serializeDate ;
var encodeValuesOnly = typeof options . encodeValuesOnly === 'boolean' ? options . encodeValuesOnly : defaults . encodeValuesOnly ;
var charset = options . charset || defaults . charset ;
if ( typeof options . charset !== 'undefined' && options . charset !== 'utf-8' && options . charset !== 'iso-8859-1' ) {
throw new Error ( 'The charset option must be either utf-8, iso-8859-1, or undefined' ) ;
}
if ( typeof options . format === 'undefined' ) {
options . format = formats [ 'default' ] ;
} else if ( ! Object . prototype . hasOwnProperty . call ( formats . formatters , options . format ) ) {
throw new TypeError ( 'Unknown format option provided.' ) ;
}
var formatter = formats . formatters [ options . format ] ;
var objKeys ;
var filter ;
if ( typeof options . filter === 'function' ) {
filter = options . filter ;
obj = filter ( '' , obj ) ;
} else if ( Array . isArray ( options . filter ) ) {
filter = options . filter ;
objKeys = filter ;
}
var keys = [ ] ;
if ( typeof obj !== 'object' || obj === null ) {
return '' ;
}
var arrayFormat ;
if ( options . arrayFormat in arrayPrefixGenerators ) {
arrayFormat = options . arrayFormat ;
} else if ( 'indices' in options ) {
arrayFormat = options . indices ? 'indices' : 'repeat' ;
} else {
arrayFormat = 'indices' ;
}
var generateArrayPrefix = arrayPrefixGenerators [ arrayFormat ] ;
if ( ! objKeys ) {
objKeys = Object . keys ( obj ) ;
}
if ( sort ) {
objKeys . sort ( sort ) ;
}
for ( var i = 0 ; i < objKeys . length ; ++ i ) {
var key = objKeys [ i ] ;
if ( skipNulls && obj [ key ] === null ) {
continue ;
}
pushToArray ( keys , stringify (
obj [ key ] ,
key ,
generateArrayPrefix ,
strictNullHandling ,
skipNulls ,
encode ? encoder : null ,
filter ,
sort ,
allowDots ,
serializeDate ,
formatter ,
encodeValuesOnly ,
charset
) ) ;
}
var joined = keys . join ( delimiter ) ;
var prefix = options . addQueryPrefix === true ? '?' : '' ;
if ( options . charsetSentinel ) {
if ( charset === 'iso-8859-1' ) {
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
prefix += 'utf8=%26%2310003%3B&' ;
} else {
// encodeURIComponent('✓')
prefix += 'utf8=%E2%9C%93&' ;
}
}
return joined . length > 0 ? prefix + joined : '' ;
} ;
/***/ } ) ,
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
/***/ "lbya" :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 05:41:57 +01:00
"use strict" ;
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "isURL" , function ( ) { return isURL ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "getProtocol" , function ( ) { return getProtocol ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "isValidProtocol" , function ( ) { return isValidProtocol ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "getAuthority" , function ( ) { return getAuthority ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "isValidAuthority" , function ( ) { return isValidAuthority ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "getPath" , function ( ) { return getPath ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "isValidPath" , function ( ) { return isValidPath ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "getQueryString" , function ( ) { return getQueryString ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "isValidQueryString" , function ( ) { return isValidQueryString ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "getFragment" , function ( ) { return getFragment ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "isValidFragment" , function ( ) { return isValidFragment ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "addQueryArgs" , function ( ) { return addQueryArgs ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "getQueryArg" , function ( ) { return getQueryArg ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "hasQueryArg" , function ( ) { return hasQueryArg ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "removeQueryArgs" , function ( ) { return removeQueryArgs ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "prependHTTP" , function ( ) { return prependHTTP ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "safeDecodeURI" , function ( ) { return safeDecodeURI ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "filterURLForDisplay" , function ( ) { return filterURLForDisplay ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "safeDecodeURIComponent" , function ( ) { return safeDecodeURIComponent ; } ) ;
/* harmony import */ var qs _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( "Bqip" ) ;
/* harmony import */ var qs _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( qs _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/ * *
* External dependencies
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var URL _REGEXP = /^(?:https?:)?\/\/\S+$/i ;
var EMAIL _REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i ;
var USABLE _HREF _REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i ;
/ * *
* Determines whether the given string looks like a URL .
*
* @ param { string } url The string to scrutinise .
*
* @ example
* ` ` ` js
* const isURL = isURL ( 'https://wordpress.org' ) ; // true
* ` ` `
*
* @ return { boolean } Whether or not it looks like a URL .
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function isURL ( url ) {
return URL _REGEXP . test ( url ) ;
}
/ * *
* Returns the protocol part of the URL .
*
* @ param { string } url The full URL .
*
* @ example
* ` ` ` js
* const protocol1 = getProtocol ( 'tel:012345678' ) ; // 'tel:'
* const protocol2 = getProtocol ( 'https://wordpress.org' ) ; // 'https:'
* ` ` `
*
* @ return { ? string } The protocol part of the URL .
* /
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function getProtocol ( url ) {
var matches = /^([^\s:]+:)/ . exec ( url ) ;
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( matches ) {
return matches [ 1 ] ;
}
}
/ * *
* Tests if a url protocol is valid .
*
* @ param { string } protocol The url protocol .
*
* @ example
* ` ` ` js
* const isValid = isValidProtocol ( 'https:' ) ; // true
* const isNotValid = isValidProtocol ( 'https :' ) ; // false
* ` ` `
*
* @ return { boolean } True if the argument is a valid protocol ( e . g . http : , tel : ) .
* /
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function isValidProtocol ( protocol ) {
if ( ! protocol ) {
return false ;
}
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return /^[a-z\-.\+]+[0-9]*:$/i . test ( protocol ) ;
}
/ * *
* Returns the authority part of the URL .
*
* @ param { string } url The full URL .
*
* @ example
* ` ` ` js
* const authority1 = getAuthority ( 'https://wordpress.org/help/' ) ; // 'wordpress.org'
* const authority2 = getAuthority ( 'https://localhost:8080/test/' ) ; // 'localhost:8080'
* ` ` `
*
* @ return { ? string } The authority part of the URL .
* /
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function getAuthority ( url ) {
var matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/ . exec ( url ) ;
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( matches ) {
return matches [ 1 ] ;
}
}
/ * *
* Checks for invalid characters within the provided authority .
*
* @ param { string } authority A string containing the URL authority .
*
* @ example
* ` ` ` js
* const isValid = isValidAuthority ( 'wordpress.org' ) ; // true
* const isNotValid = isValidAuthority ( 'wordpress#org' ) ; // false
* ` ` `
*
* @ return { boolean } True if the argument contains a valid authority .
* /
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function isValidAuthority ( authority ) {
if ( ! authority ) {
return false ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return /^[^\s#?]+$/ . test ( authority ) ;
}
/ * *
* Returns the path part of the URL .
*
* @ param { string } url The full URL .
*
* @ example
* ` ` ` js
* const path1 = getPath ( 'http://localhost:8080/this/is/a/test?query=true' ) ; // 'this/is/a/test'
* const path2 = getPath ( 'https://wordpress.org/help/faq/' ) ; // 'help/faq'
* ` ` `
*
* @ return { ? string } The path part of the URL .
* /
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function getPath ( url ) {
var matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/ . exec ( url ) ;
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( matches ) {
return matches [ 1 ] ;
}
}
/ * *
* Checks for invalid characters within the provided path .
*
* @ param { string } path The URL path .
*
* @ example
* ` ` ` js
* const isValid = isValidPath ( 'test/path/' ) ; // true
* const isNotValid = isValidPath ( '/invalid?test/path/' ) ; // false
* ` ` `
*
* @ return { boolean } True if the argument contains a valid path
* /
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function isValidPath ( path ) {
if ( ! path ) {
return false ;
}
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return /^[^\s#?]+$/ . test ( path ) ;
}
/ * *
* Returns the query string part of the URL .
*
* @ param { string } url The full URL .
*
* @ example
* ` ` ` js
* const queryString1 = getQueryString ( 'http://localhost:8080/this/is/a/test?query=true#fragment' ) ; // 'query=true'
* const queryString2 = getQueryString ( 'https://wordpress.org#fragment?query=false&search=hello' ) ; // 'query=false&search=hello'
* ` ` `
*
* @ return { ? string } The query string part of the URL .
* /
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function getQueryString ( url ) {
var matches = /^\S+?\?([^\s#]+)/ . exec ( url ) ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( matches ) {
return matches [ 1 ] ;
}
}
/ * *
* Checks for invalid characters within the provided query string .
*
* @ param { string } queryString The query string .
*
* @ example
* ` ` ` js
* const isValid = isValidQueryString ( 'query=true&another=false' ) ; // true
* const isNotValid = isValidQueryString ( 'query=true?another=false' ) ; // false
* ` ` `
*
* @ return { boolean } True if the argument contains a valid query string .
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function isValidQueryString ( queryString ) {
if ( ! queryString ) {
return false ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return /^[^\s#?\/]+$/ . test ( queryString ) ;
}
/ * *
* Returns the fragment part of the URL .
*
* @ param { string } url The full URL
*
* @ example
* ` ` ` js
* const fragment1 = getFragment ( 'http://localhost:8080/this/is/a/test?query=true#fragment' ) ; // '#fragment'
* const fragment2 = getFragment ( 'https://wordpress.org#another-fragment?query=true' ) ; // '#another-fragment'
* ` ` `
*
* @ return { ? string } The fragment part of the URL .
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function getFragment ( url ) {
var matches = /^\S+?(#[^\s\?]*)/ . exec ( url ) ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( matches ) {
return matches [ 1 ] ;
}
}
/ * *
* Checks for invalid characters within the provided fragment .
*
* @ param { string } fragment The url fragment .
*
* @ example
* ` ` ` js
* const isValid = isValidFragment ( '#valid-fragment' ) ; // true
* const isNotValid = isValidFragment ( '#invalid-#fragment' ) ; // false
* ` ` `
*
* @ return { boolean } True if the argument contains a valid fragment .
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function isValidFragment ( fragment ) {
if ( ! fragment ) {
return false ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return /^#[^\s#?\/]*$/ . test ( fragment ) ;
}
/ * *
* Appends arguments as querystring to the provided URL . If the URL already
* includes query arguments , the arguments are merged with ( and take precedent
* over ) the existing set .
*
* @ param { ? string } url URL to which arguments should be appended . If omitted ,
* only the resulting querystring is returned .
* @ param { Object } args Query arguments to apply to URL .
*
* @ example
* ` ` ` js
* const newURL = addQueryArgs ( 'https://google.com' , { q : 'test' } ) ; // https://google.com/?q=test
* ` ` `
*
* @ return { string } URL with arguments applied .
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function addQueryArgs ( ) {
var url = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : '' ;
var args = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
// If no arguments are to be appended, return original URL.
if ( ! args || ! Object . keys ( args ) . length ) {
return url ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var baseUrl = url ; // Determine whether URL already had query arguments.
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
var queryStringIndex = url . indexOf ( '?' ) ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( queryStringIndex !== - 1 ) {
// Merge into existing query arguments.
args = Object . assign ( Object ( qs _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "parse" ] ) ( url . substr ( queryStringIndex + 1 ) ) , args ) ; // Change working base URL to omit previous query arguments.
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
baseUrl = baseUrl . substr ( 0 , queryStringIndex ) ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return baseUrl + '?' + Object ( qs _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "stringify" ] ) ( args ) ;
}
/ * *
* Returns a single query argument of the url
*
* @ param { string } url URL
* @ param { string } arg Query arg name
*
* @ example
* ` ` ` js
* const foo = getQueryArg ( 'https://wordpress.org?foo=bar&bar=baz' , 'foo' ) ; // bar
* ` ` `
*
* @ return { Array | string } Query arg value .
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function getQueryArg ( url , arg ) {
var queryStringIndex = url . indexOf ( '?' ) ;
var query = queryStringIndex !== - 1 ? Object ( qs _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "parse" ] ) ( url . substr ( queryStringIndex + 1 ) ) : { } ;
return query [ arg ] ;
}
/ * *
* Determines whether the URL contains a given query arg .
*
* @ param { string } url URL
* @ param { string } arg Query arg name
*
* @ example
* ` ` ` js
* const hasBar = hasQueryArg ( 'https://wordpress.org?foo=bar&bar=baz' , 'bar' ) ; // true
* ` ` `
*
* @ return { boolean } Whether or not the URL contains the query arg .
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function hasQueryArg ( url , arg ) {
return getQueryArg ( url , arg ) !== undefined ;
}
/ * *
* Removes arguments from the query string of the url
*
* @ param { string } url URL
* @ param { ... string } args Query Args
*
* @ example
* ` ` ` js
* const newUrl = removeQueryArgs ( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar' , 'foo' , 'bar' ) ; // https://wordpress.org?baz=foobar
* ` ` `
*
* @ return { string } Updated URL
* /
2018-12-18 04:14:52 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function removeQueryArgs ( url ) {
var queryStringIndex = url . indexOf ( '?' ) ;
var query = queryStringIndex !== - 1 ? Object ( qs _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "parse" ] ) ( url . substr ( queryStringIndex + 1 ) ) : { } ;
var baseUrl = queryStringIndex !== - 1 ? url . substr ( 0 , queryStringIndex ) : url ;
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
for ( var _len = arguments . length , args = new Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) {
args [ _key - 1 ] = arguments [ _key ] ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
args . forEach ( function ( arg ) {
return delete query [ arg ] ;
} ) ;
return baseUrl + '?' + Object ( qs _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "stringify" ] ) ( query ) ;
}
/ * *
* Prepends "http://" to a url , if it looks like something that is meant to be a TLD .
*
* @ param { string } url The URL to test
*
* @ example
* ` ` ` js
* const actualURL = prependHTTP ( 'wordpress.org' ) ; // http://wordpress.org
* ` ` `
*
* @ return { string } The updated URL
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function prependHTTP ( url ) {
if ( ! USABLE _HREF _REGEXP . test ( url ) && ! EMAIL _REGEXP . test ( url ) ) {
return 'http://' + url ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return url ;
}
/ * *
* Safely decodes a URI with ` decodeURI ` . Returns the URI unmodified if
* ` decodeURI ` throws an error .
*
* @ param { string } uri URI to decode .
*
* @ example
* ` ` ` js
* const badUri = safeDecodeURI ( '%z' ) ; // does not throw an Error, simply returns '%z'
* ` ` `
*
* @ return { string } Decoded URI if possible .
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function safeDecodeURI ( uri ) {
try {
return decodeURI ( uri ) ;
} catch ( uriError ) {
return uri ;
}
}
/ * *
* Returns a URL for display .
*
* @ param { string } url Original URL .
*
* @ example
* ` ` ` js
* const displayUrl = filterURLForDisplay ( 'https://www.wordpress.org/gutenberg/' ) ; // wordpress.org/gutenberg
* ` ` `
*
* @ return { string } Displayed URL .
* /
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
function filterURLForDisplay ( url ) {
// Remove protocol and www prefixes.
var filteredURL = url . replace ( /^(?:https?:)\/\/(?:www\.)?/ , '' ) ; // Ends with / and only has that single slash, strip it.
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
if ( filteredURL . match ( /^[^\/]+\/$/ ) ) {
return filteredURL . replace ( '/' , '' ) ;
}
2018-12-14 05:41:57 +01:00
Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756
git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:22:54 +02:00
return filteredURL ;
}
/ * *
* Safely decodes a URI component with ` decodeURIComponent ` . Returns the URI component unmodified if
* ` decodeURIComponent ` throws an error .
*
* @ param { string } uriComponent URI component to decode .
*
* @ return { string } Decoded URI component if possible .
* /
function safeDecodeURIComponent ( uriComponent ) {
try {
return decodeURIComponent ( uriComponent ) ;
} catch ( uriComponentError ) {
return uriComponent ;
}
}
2018-12-14 05:41:57 +01:00
/***/ } )
2018-12-18 04:14:52 +01:00
/******/ } ) ;