summaryrefslogtreecommitdiffstats
path: root/wp-includes/js/dist/url.js
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/js/dist/url.js')
-rw-r--r--wp-includes/js/dist/url.js101
1 files changed, 52 insertions, 49 deletions
diff --git a/wp-includes/js/dist/url.js b/wp-includes/js/dist/url.js
index 0e4b204..37f5a40 100644
--- a/wp-includes/js/dist/url.js
+++ b/wp-includes/js/dist/url.js
@@ -1,8 +1,8 @@
-/******/ (function() { // webpackBootstrap
+/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
-/***/ 4793:
-/***/ (function(module) {
+/***/ 9681:
+/***/ ((module) => {
var characterMap = {
"À": "A",
@@ -517,82 +517,82 @@ module.exports.remove = removeAccents;
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
-/******/ !function() {
+/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
+/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
-/******/ function() { return module['default']; } :
-/******/ function() { return module; };
+/******/ () => (module['default']) :
+/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
-/******/ }();
+/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
-/******/ !function() {
+/******/ (() => {
/******/ // define getter functions for harmony exports
-/******/ __webpack_require__.d = function(exports, definition) {
+/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
-/******/ }();
+/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
-/******/ !function() {
-/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
-/******/ }();
+/******/ (() => {
+/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
+/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
-/******/ !function() {
+/******/ (() => {
/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
+/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
-/******/ }();
+/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
-!function() {
+(() => {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
- addQueryArgs: function() { return /* reexport */ addQueryArgs; },
- buildQueryString: function() { return /* reexport */ buildQueryString; },
- cleanForSlug: function() { return /* reexport */ cleanForSlug; },
- filterURLForDisplay: function() { return /* reexport */ filterURLForDisplay; },
- getAuthority: function() { return /* reexport */ getAuthority; },
- getFilename: function() { return /* reexport */ getFilename; },
- getFragment: function() { return /* reexport */ getFragment; },
- getPath: function() { return /* reexport */ getPath; },
- getPathAndQueryString: function() { return /* reexport */ getPathAndQueryString; },
- getProtocol: function() { return /* reexport */ getProtocol; },
- getQueryArg: function() { return /* reexport */ getQueryArg; },
- getQueryArgs: function() { return /* reexport */ getQueryArgs; },
- getQueryString: function() { return /* reexport */ getQueryString; },
- hasQueryArg: function() { return /* reexport */ hasQueryArg; },
- isEmail: function() { return /* reexport */ isEmail; },
- isURL: function() { return /* reexport */ isURL; },
- isValidAuthority: function() { return /* reexport */ isValidAuthority; },
- isValidFragment: function() { return /* reexport */ isValidFragment; },
- isValidPath: function() { return /* reexport */ isValidPath; },
- isValidProtocol: function() { return /* reexport */ isValidProtocol; },
- isValidQueryString: function() { return /* reexport */ isValidQueryString; },
- normalizePath: function() { return /* reexport */ normalizePath; },
- prependHTTP: function() { return /* reexport */ prependHTTP; },
- prependHTTPS: function() { return /* reexport */ prependHTTPS; },
- removeQueryArgs: function() { return /* reexport */ removeQueryArgs; },
- safeDecodeURI: function() { return /* reexport */ safeDecodeURI; },
- safeDecodeURIComponent: function() { return /* reexport */ safeDecodeURIComponent; }
+ addQueryArgs: () => (/* reexport */ addQueryArgs),
+ buildQueryString: () => (/* reexport */ buildQueryString),
+ cleanForSlug: () => (/* reexport */ cleanForSlug),
+ filterURLForDisplay: () => (/* reexport */ filterURLForDisplay),
+ getAuthority: () => (/* reexport */ getAuthority),
+ getFilename: () => (/* reexport */ getFilename),
+ getFragment: () => (/* reexport */ getFragment),
+ getPath: () => (/* reexport */ getPath),
+ getPathAndQueryString: () => (/* reexport */ getPathAndQueryString),
+ getProtocol: () => (/* reexport */ getProtocol),
+ getQueryArg: () => (/* reexport */ getQueryArg),
+ getQueryArgs: () => (/* reexport */ getQueryArgs),
+ getQueryString: () => (/* reexport */ getQueryString),
+ hasQueryArg: () => (/* reexport */ hasQueryArg),
+ isEmail: () => (/* reexport */ isEmail),
+ isURL: () => (/* reexport */ isURL),
+ isValidAuthority: () => (/* reexport */ isValidAuthority),
+ isValidFragment: () => (/* reexport */ isValidFragment),
+ isValidPath: () => (/* reexport */ isValidPath),
+ isValidProtocol: () => (/* reexport */ isValidProtocol),
+ isValidQueryString: () => (/* reexport */ isValidQueryString),
+ normalizePath: () => (/* reexport */ normalizePath),
+ prependHTTP: () => (/* reexport */ prependHTTP),
+ prependHTTPS: () => (/* reexport */ prependHTTPS),
+ removeQueryArgs: () => (/* reexport */ removeQueryArgs),
+ safeDecodeURI: () => (/* reexport */ safeDecodeURI),
+ safeDecodeURIComponent: () => (/* reexport */ safeDecodeURIComponent)
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-url.js
@@ -1246,8 +1246,10 @@ function filterURLForDisplay(url, maxLength = null) {
if (filteredURL.match(/^[^\/]+\/$/)) {
filteredURL = filteredURL.replace('/', '');
}
- const mediaRegexp = /([\w|:])*\.(?:jpg|jpeg|gif|png|svg)/;
- if (!maxLength || filteredURL.length <= maxLength || !filteredURL.match(mediaRegexp)) {
+
+ // capture file name from URL
+ const fileRegexp = /\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;
+ if (!maxLength || filteredURL.length <= maxLength || !filteredURL.match(fileRegexp)) {
return filteredURL;
}
@@ -1267,7 +1269,7 @@ function filterURLForDisplay(url, maxLength = null) {
}
// EXTERNAL MODULE: ./node_modules/remove-accents/index.js
-var remove_accents = __webpack_require__(4793);
+var remove_accents = __webpack_require__(9681);
var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/clean-for-slug.js
/**
@@ -1430,7 +1432,8 @@ function prependHTTPS(url) {
-}();
+})();
+
(window.wp = window.wp || {}).url = __webpack_exports__;
/******/ })()
; \ No newline at end of file