[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fb8c319: (json-encode-string): Strip properties to fix bug#43549
From: |
Sam Steingold |
Subject: |
master fb8c319: (json-encode-string): Strip properties to fix bug#43549 |
Date: |
Mon, 21 Sep 2020 11:50:45 -0400 (EDT) |
branch: master
commit fb8c319825a15f0892b84c1985961fd865e54e13
Author: Sam Steingold <sds@gnu.org>
Commit: Sam Steingold <sds@gnu.org>
(json-encode-string): Strip properties to fix bug#43549
---
lisp/json.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/json.el b/lisp/json.el
index 9002e86..c2fc157 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -432,14 +432,14 @@ Initialized lazily by `json-encode-string'.")
;; string length as our heuristic. See also bug#20154.
(if (and (< (length string) json--long-string-threshold)
(not (string-match-p (rx json--escape) string)))
- (concat "\"" string "\"")
+ (concat "\"" (substring-no-properties string) "\"")
(with-current-buffer
(or json--string-buffer
(with-current-buffer (generate-new-buffer " *json-string*")
;; This seems to afford decent performance gains.
(setq-local inhibit-modification-hooks t)
(setq json--string-buffer (current-buffer))))
- (insert ?\" string)
+ (insert ?\" (substring-no-properties string)) ; see bug#43549
(goto-char (1+ (point-min)))
(while (re-search-forward (rx json--escape) nil 'move)
(let ((char (preceding-char)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master fb8c319: (json-encode-string): Strip properties to fix bug#43549,
Sam Steingold <=