vendor/assets/javascripts/editable/inputs-ext/wysihtml5-editable.js in x-editable-rails-1.5.3 vs vendor/assets/javascripts/editable/inputs-ext/wysihtml5-editable.js in x-editable-rails-1.5.4

- old
+ new

@@ -70,21 +70,29 @@ this.$input.before('<br><br>'); } return deferred.promise(); }, + + valueIsEncoded: true, value2html: function(value, element) { $(element).html(value); + this.valueIsEncoded = false; }, html2value: function(html) { return html; }, value2input: function(value) { + value = (this.valueIsEncoded ? this.base65decode(value) : value); this.$input.data("wysihtml5").editor.setValue(value, true); - }, + }, + + base65decode: function(value) { + return decodeURIComponent( escape( atob( value.replace(/\s/g, '')))); + }, activate: function() { this.$input.data("wysihtml5").editor.focus(); },