- ;; Skip over ASCIIish printable characters.
- (while (setq mb (string-match "[\"\\/\b\f\n\r\t]\\|[^ -~]" string start))
+ ;; Only escape quotation mark, backslash and the control
+ ;; characters U+0000 to U+001F (RFC 4627, ECMA-404).
+ (while (setq mb (string-match "[\"\\[:cntrl:]]" string start))