all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* HTML and URL escaping functions
@ 2010-06-13 19:26 Aaron Maxwell
  2010-06-13 19:31 ` Deniz Dogan
  2010-06-14 12:38 ` Mark A. Hershberger
  0 siblings, 2 replies; 7+ messages in thread
From: Aaron Maxwell @ 2010-06-13 19:26 UTC (permalink / raw)
  To: emacs-devel

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")
; "&lt;whoah&gt; nelly"
; (html-unescape-str "&lt;whoah&gt; 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/



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-15 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-13 19:26 HTML and URL escaping functions Aaron Maxwell
2010-06-13 19:31 ` 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

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.