diff --git a/UI/MailPartViewers/UIxMailPartTextViewer.m b/UI/MailPartViewers/UIxMailPartTextViewer.m index 22d41a386..450c14217 100644 --- a/UI/MailPartViewers/UIxMailPartTextViewer.m +++ b/UI/MailPartViewers/UIxMailPartTextViewer.m @@ -44,6 +44,8 @@ content = [NSMutableString string]; superContent = [[super flatContentAsString] stringByEscapingHTMLString]; [content appendString: [superContent stringByDetectingURLs]]; + [content replaceString: @"\r\n" withString: @"
"]; + [content replaceString: @"\n" withString: @"
"]; return content; } diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index 5e7ffceac..5581a0084 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -445,44 +445,6 @@ function generateQueryString(queryDict) { return s; } -function getQueryParaArray(s) { - if (s.charAt(0) == "?") s = s.substr(1, s.length - 1); - return s.split("&"); -} - -function getQueryParaValue(s, name) { - var t; - - t = getQueryParaArray(s); - for (var i = 0; i < t.length; i++) { - var s = t[i]; - - if (s.indexOf(name) != 0) - continue; - - s = s.substr(name.length, s.length - name.length); - return decodeURIComponent(s); - } - return null; -} - -/* opener callback */ - -function triggerOpenerCallback() { - /* this code has some issue if the folder has no proper trailing slash! */ - if (window.opener && !window.opener.closed) { - var t, cburl; - - t = getQueryParaValue(window.location.search, "openerurl="); - cburl = window.opener.location.href; - if (cburl[cburl.length - 1] != "/") { - cburl = cburl.substr(0, cburl.lastIndexOf("/") + 1); - } - cburl = cburl + t; - window.opener.location.href = cburl; - } -} - /* selection mechanism */ function deselectAll(parent) {