[cl-wiki-devel] Encoding question and a patch

Stefan Scholl sscholl at common-lisp.net
Thu Sep 8 07:45:59 UTC 2005


On 2005-09-07 11:47:19, Ian Clelland wrote:
> On 9/7/05, Stefan Scholl <sscholl at common-lisp.net> wrote:
> > I'm setting it in INIT
> > 
> >         *escape-char-p* #'(lambda (c) (find c "<>&"))
> > 
> > Now it's possible to use the symbol ESC with CL-WHO like
> > intended.
> 
> So, at this point, is there any difference at all between
> #'escape-for-html in cl-wiki and #'escape-string in cl-who?

ESCAPE-STRING gets called when the symbol ESC is found inside
CL-WHO's WITH-HTML-OUTPUT-TO-STRING


> As far as I can tell, they do exactly the same thing (though in
> slightly different ways). #'escape-string is a bit more flexible, but
> is about 45% slower on my test machine. It seems a bit odd to have
> both of these functions available now, just to call one at display
> time and the other at edit time.

ESC is the common style when using CL-WHO. I don't want it to
look more complicated than necessary at the moment.

All the examples for CL-WHO use ESC.

Speed isn't that important at the moment. The page is displayed
more often than edited. We can tweak this later when needed.
Maybe with a patch for CL-WHO itself.

Have you tested both functions with a larger string? About 20 KiB
or something? From the code I've seen ESCAPE-STRING seems to be
optimized that way that it outputs larger chunks of code between
the characters that needed escaping.


Regards,
Stefan




More information about the Cl-wiki-devel mailing list