From 82576b3ee24dfc3222a6223e2b95d3a61088b5f3 Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Tue, 25 Feb 2014 00:57:34 +0400 Subject: [PATCH] Fix html to plain conversion --- package.json | 2 +- .../v/0.0.0/static/ckeditor/plugins/plain/plugin.js | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a1f1df127..41ce982be 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "RainLoop", "title": "RainLoop Webmail", "version": "1.6.3", - "release": "713", + "release": "715", "description": "Simple, modern & fast web-based email client", "homepage": "http://rainloop.net", "main": "Gruntfile.js", diff --git a/rainloop/v/0.0.0/static/ckeditor/plugins/plain/plugin.js b/rainloop/v/0.0.0/static/ckeditor/plugins/plain/plugin.js index 0d6b04976..b81833dc6 100644 --- a/rainloop/v/0.0.0/static/ckeditor/plugins/plain/plugin.js +++ b/rainloop/v/0.0.0/static/ckeditor/plugins/plain/plugin.js @@ -2,6 +2,9 @@ (function() { var + + $div = $('
'), + trim = $.trim, /** @@ -74,22 +77,21 @@ .replace(/<\/blockquote>/gmi, '\n__bq__end__\n') .replace(/]*>([\s\S\r\n]*?)<\/a>/gmi, convertLinks) .replace(/ /gi, ' ') - .replace(/<[^>]*>/gm, '') .replace(/>/gi, '>') .replace(/</gi, '<') .replace(/&/gi, '&') - .replace(/'/gi, '\'') - .replace(/&#\d{2,5};/gi, '') - .replace(/&\w{2,6};/gi, '') + .replace(/<[^>]*>/gm, '') ; - return sText + sText = sText .replace(/\n[ \t]+/gm, '\n') .replace(/[\n]{3,}/gm, '\n\n') .replace(/__bq__start__([\s\S\r\n]*)__bq__end__/gm, convertBlockquote) .replace(/__bq__start__/gm, '') .replace(/__bq__end__/gm, '') ; + + return $div.html(sText).text(); }, /**