Browse files

Removes certain characters when generating URL.

  • Loading branch information...
accidentalrebel committed Apr 20, 2017
1 parent 18c9476 commit 0398b22925754a2f6b006ca201bca649cd026031
Showing with 1 addition and 1 deletion.
  1. +1 −1 op-util.el
@@ -180,7 +180,7 @@ so do `trim-string-left' and `trim-string-right'."
"Encode STRING to legal URL. Why we do not use `url-encode-url' to encode the
string, is that `url-encode-url' will convert all not allowed characters into
encoded ones, like %3E, but we do NOT want this kind of url."
(downcase (replace-regexp-in-string "[ :/\\]+" "-" string)))
(downcase (replace-regexp-in-string "[ .,:;/\\]+" "-" (replace-regexp-in-string "[.!?'\"]" "" (replace-regexp-in-string "[.!?]+$" "" string)))))
(defun get-full-url (uri)
"Get the full url of URI, by joining `op/site-domain' with URI."

0 comments on commit 0398b22

Please sign in to comment.