[hunchentoot-devel] url-encode doesn't encode apostrophes
Robert Uhl
eadmund42 at gmail.com
Fri Dec 21 20:57:15 UTC 2007
I'm using url-encode to encode strings that I use for keys (see
e.g. <http://octopodial-chrome.com/tasting-notes/beer/Fuller%26rsquo%3Bs/2000%20Vintage%20Ale>;
the brewer and beer name strings are both Unicode/HTML and contain
characters meaningful in a URL).
While running my pages through the w3c validator, I discovered that
url-encode doesn't encode apostrophes ('), so now I run my strings
through (cl-who:encode-string (hunchentoot:url-encode string)); is this
the appropriate way to do things?
It might be: url-encode turns a string into a string suitable for a URL
and encode-string turns a string into a string suitable for an HTML
attribute value. Still, it seems a bit...complex.
--
Robert Uhl <http://public.xdi.org/=ruhl>
I'm proud to be an old-fashioned bigoted unixoid. They'll take my
keyboard away from me when they pry it from the shattered skulls of my
enemies. --Mark Hughes
More information about the Tbnl-devel
mailing list