mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Small fixes
Utf8 clear supports icon unicode
This commit is contained in:
parent
e6725198c4
commit
19f089d0bf
15 changed files with 141 additions and 62 deletions
|
|
@ -244,9 +244,7 @@
|
|||
*/
|
||||
Utils.encodeHtml = function (sText)
|
||||
{
|
||||
return Utils.isNormal(sText) ? sText.toString()
|
||||
.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|
||||
.replace(/"/g, '"').replace(/'/g, ''') : '';
|
||||
return Utils.isNormal(sText) ? _.escape(sText.toString()) : '';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -512,7 +510,7 @@
|
|||
/**
|
||||
* @param {?} oEvent
|
||||
*/
|
||||
Utils.killCtrlAandS = function (oEvent)
|
||||
Utils.kill_CtrlA_CtrlS = function (oEvent)
|
||||
{
|
||||
oEvent = oEvent || window.event;
|
||||
if (oEvent && oEvent.ctrlKey && !oEvent.shiftKey && !oEvent.altKey)
|
||||
|
|
@ -944,7 +942,7 @@
|
|||
|
||||
fixAttibuteValue = function () {
|
||||
return (arguments && 1 < arguments.length) ?
|
||||
'' + arguments[1] + arguments[2].replace(/</g, '<').replace(/>/g, '>') : '';
|
||||
'' + arguments[1] + _.escape(arguments[2]) : '';
|
||||
},
|
||||
|
||||
convertLinks = function () {
|
||||
|
|
@ -1550,6 +1548,36 @@
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sStr
|
||||
* @return {string}
|
||||
*/
|
||||
Utils.FullHtmlEncode = function (sStr)
|
||||
{
|
||||
var
|
||||
iIndex = 0,
|
||||
sChr = '',
|
||||
iChrCode = 0,
|
||||
sResult = '';
|
||||
;
|
||||
|
||||
for (iIndex = 0; iIndex < sStr.length; iIndex++)
|
||||
{
|
||||
sChr = sStr[iIndex];
|
||||
if (-1 < Utils.inArray(sChr, ['&', '<', '>', '"', '`', '\'']))
|
||||
{
|
||||
sResult += _.escape(sChr);
|
||||
}
|
||||
else
|
||||
{
|
||||
iChrCode = sChr.charCodeAt(0);
|
||||
sResult += (iChrCode > 128) ? '&#' + iChrCode + ';' : sChr;
|
||||
}
|
||||
}
|
||||
|
||||
return sResult;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object|Array} mObjectOrObjects
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue