From 0ee602102e8add24bc9c27e33d8c8e3f8cb5c82b Mon Sep 17 00:00:00 2001 From: nobody Date: Mon, 23 May 2022 06:15:05 +0200 Subject: [PATCH] Redirection fixed (#999) --- core/constants.js | 1 + core/request-analyzer.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/core/constants.js b/core/constants.js index 3d09bd7d..b1b26c9a 100644 --- a/core/constants.js +++ b/core/constants.js @@ -57,6 +57,7 @@ const Resource = { 'VERSION_EXPRESSION': /(?:\d{1,2}\.){1,3}\d{1,2}(?:-\d)?|latest/, 'SINGLE_NUMBER_EXPRESSION': /^\D+@?\d.*$/, 'MATHJAX': /\/\w.*(?:\d{1,2}\.){1,3}\d{1,2}(?:-\d)?\/|\/(mathjax\/)?latest\//, + 'TINYMCE': /\/\w.*(?:\d{1,2}\.){1,3}\d{1,2}(?:-\d)?\//, 'VERSION_PLACEHOLDER': '{version}' }; diff --git a/core/request-analyzer.js b/core/request-analyzer.js index 4946c762..54595c35 100644 --- a/core/request-analyzer.js +++ b/core/request-analyzer.js @@ -256,6 +256,9 @@ requestAnalyzer._getPathOfBundle = function (initiator, channelHost, channelPath }; } } + if (bundle === 'TinyMCE (Bundle)' && filename !== 'tinymce.min.js') { + filename = channelPath.replace(Resource.TINYMCE, ''); + } return helpers.formatFilename(filename.endsWith('.js') ? `${targetPath + filename}m` : targetPath + filename);