xi-conversations

Minimal clone of thunderbird conversations
git clone https://git.ce9e.org/xi-conversations.git

commit
d5d31834c63f6f563ac5aa2136724549a1ba5f5a
parent
49b2763efe4bfa3c5c2e7cbb8f8477849a334908
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-08-12 09:46
trim quotes from recipients

Diffstat

M src/js/util.js 7 ++++++-

1 files changed, 6 insertions, 1 deletions


diff --git a/src/js/util.js b/src/js/util.js

@@ -1,3 +1,8 @@
   -1     1 var trimQuotes = function(s) {
   -1     2 	var quotes = ['"', "'"];
   -1     3 	return s && s.endsWith(s[0]) && quotes.includes(s[0]) ? s.slice(1, -1) : s;
   -1     4 };
   -1     5 
    1     6 var getParams = function() {
    2     7 	const params = {};
    3     8 	for (let part of location.search.substr(1).split('&')) {
@@ -91,7 +96,7 @@ var parseContacts = function(raw) {
   91    96 		var match = /(.*) <(.*)>/.exec(r);
   92    97 		if (match) {
   93    98 			contacts.push({
   94    -1 				name: match[1],
   -1    99 				name: trimQuotes(match[1]),
   95   100 				email: match[2],
   96   101 			});
   97   102 		} else {