mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
Source refactoring
This commit is contained in:
parent
09b04740e7
commit
104ac0806a
27 changed files with 204 additions and 715 deletions
|
|
@ -28,6 +28,11 @@
|
|||
*/
|
||||
Globals.startMicrotime = (new window.Date()).getTime();
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
Globals.community = RL_COMMUNITY;
|
||||
|
||||
/**
|
||||
* @type {?}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
*/
|
||||
HtmlEditor.prototype.clearSignatureSigns = function (sText)
|
||||
{
|
||||
return sText.replace(/(\u0002|\u0003|\u200C|\u200D)/g, '');
|
||||
return sText.replace(/(\u200C|<x-signature>|<\/x-signature>)/g, '');
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -861,10 +861,7 @@
|
|||
;
|
||||
|
||||
sText = sHtml
|
||||
// specials for signature
|
||||
.replace(/\u0002\u0002/g, '\u200C\u200C')
|
||||
.replace(/\u0003\u0003/g, '\u200D\u200D')
|
||||
|
||||
.replace(/<x-signature>([\s\S]*)<\/x-signature>/gm, '\u200C$1\u200C')
|
||||
.replace(/<pre[^>]*>([\s\S\r\n]*)<\/pre>/gmi, convertPre)
|
||||
.replace(/[\s]+/gm, ' ')
|
||||
.replace(/((?:href|data)\s?=\s?)("[^"]+?"|'[^']+?')/gmi, fixAttibuteValue)
|
||||
|
|
@ -1012,16 +1009,12 @@
|
|||
sPlain = aText.join("\n");
|
||||
|
||||
sPlain = sPlain
|
||||
|
||||
// specials for signature
|
||||
.replace(/\u200C\u200C/g, '\u0002\u0002')
|
||||
.replace(/\u200D\u200D/g, '\u0003\u0003')
|
||||
|
||||
// .replace(/~~~\/blockquote~~~\n~~~blockquote~~~/g, '\n')
|
||||
.replace(/&/g, '&')
|
||||
.replace(/>/g, '>').replace(/</g, '<')
|
||||
.replace(/~~~blockquote~~~[\s]*/g, '<blockquote>')
|
||||
.replace(/[\s]*~~~\/blockquote~~~/g, '</blockquote>')
|
||||
.replace(/\u200C([\s\S]*)\u200C/g, '<x-signature>$1</x-signature>')
|
||||
.replace(/\n/g, '<br />')
|
||||
;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue