diff --git a/src/js/controller/write.js b/src/js/controller/write.js index ee6af32..417effb 100644 --- a/src/js/controller/write.js +++ b/src/js/controller/write.js @@ -6,7 +6,6 @@ define(function(require) { aes = require('cryptoLib/aes-cbc'), util = require('cryptoLib/util'), str = require('js/app-config').string, - $ = require('jquery'), emailDao; // @@ -39,7 +38,7 @@ define(function(require) { } function fillFields(re) { - var from, body; + var from, cleaned, body; if (!re) { return; @@ -57,7 +56,8 @@ define(function(require) { // clean text from markup if to prevent injection in contenteditable if (!re.html) { - body += $('

' + re.body + '

').text().split('\n').join('
'); + cleaned = angular.element('

' + re.body + '

').text(); + body += cleaned.split('\n').join('
'); $scope.body = body; } } @@ -170,7 +170,7 @@ define(function(require) { var text = body.replace(regex, '').split('

').join('\n').split('
').join('\n').split('
').join('\n'); - return $('

' + text + '

').text(); + return angular.element('

' + text + '

').text(); } //