alphapapa / org-protocol-capture-html

Capture HTML from the browser selection into Emacs as org-mode content
453 stars 39 forks source link

urlencode adds a trailing newline character #19

Closed xuchunyang closed 7 years ago

xuchunyang commented 7 years ago
function urlencode {
    python -c "import sys, urllib; print urllib.quote(sys.stdin.read(), safe='')"
}
~$ urlencode <<<"hi"
hi%0A

because of it when I pass http://example.com to org-protocol-capture-html.sh, Org mode will receive http://example.com\n.