Bug 471860 - Use .trim*() in Calendar, r=philipp
(Av1) Remove trimString() ++
This commit is contained in:
Родитель
3bd149d6b9
Коммит
5ecf22e627
|
@ -123,9 +123,8 @@ cal.convertByteArray = function calConvertByteArray(aResult, aResultLength, aCha
|
|||
|
||||
cal.safeNewXML = function calSafeNewXML(aStr) {
|
||||
// Strip <?xml and surrounding whitespaces
|
||||
return new XML(aStr.replace(/(^\s*(<\?xml[^>]*>)?\s*|\s+$)/g, ""));
|
||||
return new XML(aStr.replace(/^\s*<\?xml[^>]*>/g, "").trimRight());
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* getInterface method for providers. This should be called in the context of
|
||||
|
|
|
@ -852,7 +852,7 @@ calWcapSession.prototype = {
|
|||
var ar = this.getUserPreferences("X-NSCP-WCAP-PREF-ceDefaultAlarmEmail");
|
||||
if (ar.length > 0 && ar[0].length > 0) {
|
||||
for each (var i in ar) {
|
||||
ret = ret.concat( i.split(/[;,]/).map(trimString) );
|
||||
ret = ret.concat(i.split(/[;,]/).map(String.trim));
|
||||
}
|
||||
}
|
||||
out_count.value = ret.length;
|
||||
|
|
|
@ -210,16 +210,12 @@ function filterXmlNodes(name, rootNode) {
|
|||
var nodeList = rootNode.getElementsByTagName(name);
|
||||
for (var i = 0; i < nodeList.length; ++i) {
|
||||
var node = nodeList.item(i);
|
||||
ret.push(trimString(node.textContent));
|
||||
ret.push(node.textContent.trim());
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
function trimString(str) {
|
||||
return str.replace(/(^\s+|\s+$)/g, "");
|
||||
}
|
||||
|
||||
function getTime() {
|
||||
if (g_bShutdown) {
|
||||
return null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче