use url-hexify-string to encode issue report body

Fixes #9301
This commit is contained in:
d12frosted 2017-07-29 20:05:24 +03:00
parent 8212b29ce9
commit d5ae3a6a1f
No known key found for this signature in database
GPG Key ID: 8F60E862D6F5CE8F
1 changed files with 3 additions and 7 deletions

View File

@ -295,12 +295,8 @@ that the issue has been created successfully, you can close this buffer.
(defun spacemacs//report-issue-done ()
(interactive)
(let ((url "http://github.com/syl20bnr/spacemacs/issues/new?body="))
(setq url (url-encode-url (concat url (buffer-string))))
;; HACK: encode some characters according to HTML URL Encoding Reference
;; http://www.w3schools.com/tags/ref_urlencode.asp
(setq url (replace-regexp-in-string "#" "%23" url))
(setq url (replace-regexp-in-string ";" "%3B" url))
(browse-url url)))
(let ((url "http://github.com/syl20bnr/spacemacs/issues/new?body=")
(body (url-hexify-string (buffer-string))))
(browse-url (url-encode-url (concat url body)))))
(provide 'core-debug)