Skip to content

Commit

Permalink
bug fix of percent encoding
Browse files Browse the repository at this point in the history
* twittering-mode.el (twittering-percent-encode): bug fix:
'\n','\r','\t' were not encoded correctly.
  • Loading branch information
hayamiz committed Jan 8, 2010
1 parent 1d82f4e commit 9676fc4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2010-01-08 Yuto Hayamizu <y.hayamizu@gmail.com>

* twittering-mode.el (twittering-percent-encode): bug fix:
'\n','\r','\t' were not encoded correctly.

2010-01-08 Satoshi Yatagawa <yata_github@y.hauN.org>

* twittering-mode.el (twittering-use-show-minibuffer-length): Add
Expand Down
6 changes: 3 additions & 3 deletions test/test-twittering-mode.el
Expand Up @@ -86,12 +86,12 @@
(defcase test-percent-encode nil nil
(test-assert-string-equal "Rinko"
(twittering-percent-encode "Rinko"))

(test-assert-string-equal "%25"
(twittering-percent-encode "%"))

(test-assert-string-equal "love+plus"
(twittering-percent-encode "love plus")))
(twittering-percent-encode "love plus"))
(test-assert-string-equal "%0a"
(twittering-percent-encode "\n")))

(with-network
(when (require 'url nil t)
Expand Down
2 changes: 1 addition & 1 deletion twittering-mode.el
Expand Up @@ -1518,7 +1518,7 @@ If STATUS-DATUM is already in DATA-VAR, return nil. If not, return t."
((twittering-url-reserved-p c)
(char-to-string c))
((eq c ? ) "+")
(t (format "%%%x" c))))
(t (format "%%%02x" c))))
(encode-coding-string str coding-system)
""))

Expand Down

0 comments on commit 9676fc4

Please sign in to comment.