mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Pgp improvements
This commit is contained in:
parent
3849fd02b4
commit
5123841540
18 changed files with 397 additions and 80 deletions
|
|
@ -852,7 +852,11 @@
|
|||
},
|
||||
|
||||
convertPre = function () {
|
||||
return (arguments && 1 < arguments.length) ? arguments[1].toString().replace(/[\n]/gm, '<br />') : '';
|
||||
return (arguments && 1 < arguments.length) ?
|
||||
arguments[1].toString()
|
||||
.replace(/[\n]/gm, '<br />')
|
||||
.replace(/[\r]/gm, '')
|
||||
: '';
|
||||
},
|
||||
|
||||
fixAttibuteValue = function () {
|
||||
|
|
@ -868,7 +872,7 @@
|
|||
sText = sHtml
|
||||
.replace(/\u0002([\s\S]*)\u0002/gm, '\u200C$1\u200C')
|
||||
.replace(/<p[^>]*><\/p>/gi, '')
|
||||
.replace(/<pre[^>]*>([\s\S\r\n]*)<\/pre>/gmi, convertPre)
|
||||
.replace(/<pre[^>]*>([\s\S\r\n\t]*)<\/pre>/gmi, convertPre)
|
||||
.replace(/[\s]+/gm, ' ')
|
||||
.replace(/((?:href|data)\s?=\s?)("[^"]+?"|'[^']+?')/gmi, fixAttibuteValue)
|
||||
.replace(/<br[^>]*>/gmi, '\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue