[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 4ded53d 250/350: All vCard lines should be delimit
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 4ded53d 250/350: All vCard lines should be delimited with CRLF |
Date: |
Mon, 14 Aug 2017 11:46:48 -0400 (EDT) |
branch: externals/ebdb
commit 4ded53d6bf05a52b979d85b52a5ac30dcc7003cf
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
All vCard lines should be delimited with CRLF
* ebdb-vcard.el: Probably safer to enforce this from the very
beginning.
---
ebdb-vcard.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/ebdb-vcard.el b/ebdb-vcard.el
index 29e37ab..d1fad84 100644
--- a/ebdb-vcard.el
+++ b/ebdb-vcard.el
@@ -123,7 +123,7 @@ not always respect these headings."
(defsubst ebdb-vcard-escape (str)
"Escape commas, semi-colons and newlines in STR."
(replace-regexp-in-string
- "\\([^\\]\\)\n" "\\1\\\\n"
+ "\\([^\\]\\)\\([\n\r]+\\)" "\\1\\\\\\2"
(replace-regexp-in-string "\\([^\\]\\)\\([,;]\\)" "\\1\\\\\\2" str)))
(defun ebdb-vcard-unescape (str)
@@ -193,11 +193,11 @@ All this does is split role instances into multiple
fields."
(ebdb-fmt-field f fld 'normal r))))
fields))
(concat
- (format "BEGIN:VCARD\nVERSION:%s\n"
+ (format "BEGIN:VCARD\r\nVERSION:%s\r\n"
(slot-value f 'version-string))
(ebdb-fmt-record-header f r header-fields)
(ebdb-fmt-record-body f r body-fields)
- "\nEND:VCARD\n")))
+ "\r\nEND:VCARD\r\n")))
(cl-defmethod ebdb-fmt-record-header ((f ebdb-formatter-vcard)
(r ebdb-record)
@@ -208,8 +208,8 @@ VCARDs don't really have the concept of a \"header\", so
this
method is just responsible for formatting the record name."
(let ((name (car fields)))
(concat
- (format "FN:%s\n" (ebdb-string name))
- (format "N;SORT-AS=\"%s\":%s\n"
+ (format "FN:%s\r\n" (ebdb-string name))
+ (format "N;SORT-AS=\"%s\":%s\r\n"
(ebdb-record-sortkey r)
(ebdb-fmt-field f name 'normal r)))))
@@ -221,19 +221,19 @@ method is just responsible for formatting the record
name."
(format "%s:%s"
(car f) (cdr f)))
fields
- "\n"))
+ "\r\n"))
(cl-defmethod ebdb-fmt-record-body :around ((_f ebdb-formatter-vcard-40)
(_r ebdb-record-person)
(_fields list))
(let ((str (cl-call-next-method)))
- (concat str "\nKIND:individual")))
+ (concat str "\r\nKIND:individual")))
(cl-defmethod ebdb-fmt-record-body :around ((_f ebdb-formatter-vcard-40)
(_r ebdb-record-organization)
(_fields list))
(let ((str (cl-call-next-method)))
- (concat str "\nKIND:org")))
+ (concat str "\r\nKIND:org")))
(cl-defmethod ebdb-fmt-field ((_f ebdb-formatter-vcard)
(field ebdb-field)
- [elpa] externals/ebdb 5135645 260/350: Split out ebdb-notice-record and ebdb-notice-field methods, (continued)
- [elpa] externals/ebdb 5135645 260/350: Split out ebdb-notice-record and ebdb-notice-field methods, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 71a93f5 268/350: Put a load protection in ebdb-mua-update-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb cacb97b 271/350: Fix bug in MUA record creation, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e5bdee2 278/350: Rework ebdb-mail-yank, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 8dd1600 273/350: Change type of anniversary field dates, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 57b2514 276/350: Use ebdb-with-record-edits in more places, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f44a797 286/350: New function ebdb-mua-in-ebdb-buffer, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 4ce353e 237/350: Migrate more search routines to the ebdb-search-display thing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 7040cad 247/350: Expand ebdb-helm to complete on mails as well, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a6bc423 249/350: Remove unused customization groups, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 4ded53d 250/350: All vCard lines should be delimited with CRLF,
Eric Abrahamsen <=
- [elpa] externals/ebdb a776d37 248/350: Don't use copy-sequence plus add-text-properties on strings, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 96b113d 251/350: New functions for folding/unfolding long vCard lines, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b52cdc0 265/350: Record-insert|delete-field methods can find their own slots, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb fcee6ab 267/350: Protect against no current record when redisplaying, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f3b9525 269/350: Temporarily abandon having record-change-name accept strings, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 1a31515 274/350: Fixes to record loading, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 01262e3 277/350: Mark EBDB buffers as modified after edits, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb cc83f62 197/350: Add protection around ebdb-record-uuid, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 4f3db7f 195/350: Save match data around ebdb-parse-i18n, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb fcf0702 275/350: Mark EBDB buffers as unmodified after save, Eric Abrahamsen, 2017/08/14