Skip to content

Commit

Permalink
Removes certain characters when generating URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
accidentalrebel committed Apr 20, 2017
1 parent 18c9476 commit 0398b22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion op-util.el
Expand Up @@ -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."
Expand Down

0 comments on commit 0398b22

Please sign in to comment.