From: Aaron Maxwell <amax@redsymbol.net>
To: emacs-devel@gnu.org
Subject: HTML and URL escaping functions
Date: Sun, 13 Jun 2010 12:26:27 -0700 [thread overview]
Message-ID: <201006131226.27512.amax@redsymbol.net> (raw)
Hi all,
I wrote a few functions for escaping text with HTML entities, and back; and
for quoting strings for inclusion in HTTP URLs, and back. The code is here:
http://gist.github.com/436913
Examples (there are equivalents that work on regions too):
; (html-escape-str "<whoah> nelly")
; "<whoah> nelly"
; (html-unescape-str "<whoah> nelly")
; "<whoah> nelly"
; (url-quote-str "ab/c de/f")
; "ab/c%20de/f"
; (url-unquote-str "ab/c%20de/f")
; "ab/c de/f"
It needs some work, but is probably far enough along to be useful.
Do you know if this exists already, in some free software library? I haven't
been able to find equivalents anywhere. I partly wrote this to practice
elisp, so it's okay if this is reinventing a wheel. If not, I'd like to
clean it up so others can use it.
Thanks,
Aaron
--
Aaron Maxwell
http://redsymbol.net/
next reply other threads:[~2010-06-13 19:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-13 19:26 Aaron Maxwell [this message]
2010-06-13 19:31 ` HTML and URL escaping functions Deniz Dogan
2010-06-15 15:39 ` Aaron Maxwell
2010-06-15 21:37 ` Juri Linkov
2010-06-14 12:38 ` Mark A. Hershberger
2010-06-15 15:45 ` Aaron Maxwell
2010-06-15 17:37 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201006131226.27512.amax@redsymbol.net \
--to=amax@redsymbol.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.