@@ -608,7 +608,7 @@ define([
608
608
decodeDirectives : function ( content ) {
609
609
// escape special chars in directives url to use it in regular expression
610
610
var url = this . makeDirectiveUrl ( '%directive%' ) . replace ( / ( [ $ ^ . ? * ! + : = ( ) \[ \] { } | \\ ] ) / g, '\\$1' ) ,
611
- reg = new RegExp ( url . replace ( '%directive%' , '([a-zA-Z0-9% ,_-]+)\/? ' ) ) ;
611
+ reg = new RegExp ( url . replace ( '%directive%' , '([a-zA-Z0-9,_-]+(?:%2[A-Z]|)+) ' ) ) ;
612
612
613
613
return content . gsub ( reg , function ( match ) { //eslint-disable-line no-extra-bind
614
614
return Base64 . mageDecode ( decodeURIComponent ( match [ 1 ] ) ) . replace ( / " / g, '"' ) ;
@@ -640,12 +640,12 @@ define([
640
640
* @return {* }
641
641
*/
642
642
decodeContent : function ( content ) {
643
- content = varienGlobalEvents . fireEventReducer ( 'wysiwygDecodeContent' , content ) ;
644
-
645
643
if ( this . config [ 'add_directives' ] ) {
646
644
content = this . decodeDirectives ( content ) ;
647
645
}
648
646
647
+ content = varienGlobalEvents . fireEventReducer ( 'wysiwygDecodeContent' , content ) ;
648
+
649
649
return content ;
650
650
} ,
651
651
@@ -654,12 +654,12 @@ define([
654
654
* @return {* }
655
655
*/
656
656
encodeContent : function ( content ) {
657
- content = varienGlobalEvents . fireEventReducer ( 'wysiwygEncodeContent' , content ) ;
658
-
659
657
if ( this . config [ 'add_directives' ] ) {
660
658
content = this . encodeDirectives ( content ) ;
661
659
}
662
660
661
+ content = varienGlobalEvents . fireEventReducer ( 'wysiwygEncodeContent' , content ) ;
662
+
663
663
return content ;
664
664
} ,
665
665
0 commit comments