Skip to content

Commit

Permalink
WYSIWYG JS - Directive URL not always properly detected magento#7167
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Siefer committed Nov 28, 2017
1 parent 3d628f8 commit 44232cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,10 @@ define([
decodeDirectives: function (content) {
// escape special chars in directives url to use it in regular expression
var url = this.makeDirectiveUrl('%directive%').replace(/([$^.?*!+:=()\[\]{}|\\])/g, '\\$1'),
reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9,_-]+)'));
reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9%,_-]+)'));

return content.gsub(reg, function (match) { //eslint-disable-line no-extra-bind
return Base64.mageDecode(match[1]);
return Base64.mageDecode(decodeURIComponent(match[1]));
});
},

Expand Down

0 comments on commit 44232cd

Please sign in to comment.