mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Small fixes
Release commit
This commit is contained in:
parent
ff7b71fd6c
commit
5d6ca00687
6 changed files with 25 additions and 10 deletions
|
|
@ -1676,6 +1676,10 @@ Utils.htmlToPlain = function (sHtml)
|
|||
return '';
|
||||
},
|
||||
|
||||
convertPre = function () {
|
||||
return (arguments && 1 < arguments.length) ? arguments[1].toString().replace(/[\n]/gm, '<br />') : '';
|
||||
},
|
||||
|
||||
fixAttibuteValue = function () {
|
||||
return (arguments && 1 < arguments.length) ?
|
||||
'' + arguments[1] + arguments[2].replace(/</g, '<').replace(/>/g, '>') : '';
|
||||
|
|
@ -1687,6 +1691,7 @@ Utils.htmlToPlain = function (sHtml)
|
|||
;
|
||||
|
||||
sText = sHtml
|
||||
.replace(/<pre[^>]*>([\s\S\r\n]*)<\/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