Skip to content

Commit

Permalink
MAGETWO-58617: [GitHub] WYSIWYG editor loses data after show-hide edi…
Browse files Browse the repository at this point in the history
…tor #5811
  • Loading branch information
undefined-olha committed Nov 4, 2016
1 parent 2adb6e2 commit e4ffd59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,9 @@ define([

encodeDirectives: function(content) {
// collect all HTML tags with attributes that contain directives
return content.gsub(/<([a-z0-9\-\_]+.+?)([a-z0-9\-\_]+=".*?\{\{.+?\}\}.*?".+?)>/i, function(match) {
return content.gsub(/\<([a-z0-9\-\_]+.+?)([a-z0-9\-\_]+=".*?\{\{.+?\}\}.*?".*?)>/i, function(match) {
var attributesString = match[2];

// process tag attributes string
attributesString = attributesString.gsub(/([a-z0-9\-\_]+)="(.*?)(\{\{.+?\}\})(.*?)"/i, function(m) {
return m[1] + '="' + m[2] + this.makeDirectiveUrl(Base64.mageEncode(m[3])) + m[4] + '"';
Expand Down

0 comments on commit e4ffd59

Please sign in to comment.