[cl-who-devel] convert-tag-to-string-list and *html-empty-tag* bug maybe :)

Hi,
From my testing it seems that the default convert-tag-to-string-list isn't finding the tags in html-empty-tag when it should. It looks like tag is getting converted to a string but *html-empty-tags* are keywords.
I changed (member tag *html-empty-tags*) to (member tag *html-empty-tags* :test #'string-equal) and made it happy. the following test (in-package :who) (with-html-output-to-string (blah) (with-html-output (blah) (:input :value "test this") (:div) (:div "test this"))) Used to produce: "<input value='test this'></input><div></div><div>test this</div>" and now produces; "<input value='test this' /><div></div><div>test this</div>"

Hi Simon, On 5/27/07, Simon Cusack <scusack@fastmail.com.au> wrote:
I changed (member tag *html-empty-tags*) to (member tag *html-empty-tags* :test #'string-equal)
You're right. It was my bad. The patch that I sent in had this bug. I was too concern about (:div) producing <div></div> and didn't manually test the other case. The browser didn't complain <br></br> :-( If I unit test this code I should have caught it. Sorry for the inconvience. Regards, -- Mac

Hi Mac, That's cool, we all make em :) I was also wondering about some of the tags that appear in the *html-empty-tags* list. Some of them don't appear to be html tags, for example :limittext :of :spacer, etc. Should it be a list of tags for html4.0? or xhtml? (off hand I don't know if that would be the same list or not) or is the intention that I bind this to the list that is appropriate for me in which case maybe it should start out as an empty list. regards, sim ----- Original message ----- From: "Mac Chan" <emailmac@gmail.com> To: "General interest list about cl-who" <cl-who-devel@common-lisp.net> Date: Sun, 27 May 2007 20:00:02 -0700 Subject: Re: [cl-who-devel] convert-tag-to-string-list and *html-empty-tag* bug maybe :) Hi Simon, On 5/27/07, Simon Cusack <scusack@fastmail.com.au> wrote:
I changed (member tag *html-empty-tags*) to (member tag *html-empty-tags* :test #'string-equal)
You're right. It was my bad. The patch that I sent in had this bug. I was too concern about (:div) producing <div></div> and didn't manually test the other case. The browser didn't complain <br></br> :-( If I unit test this code I should have caught it. Sorry for the inconvience. Regards, -- Mac _______________________________________________ cl-who-devel site list cl-who-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cl-who-devel

On 5/27/07, Simon Cusack <scusack@fastmail.com.au> wrote:
I was also wondering about some of the tags that appear in the *html-empty-tags* list. Some of them don't appear to be html tags, for example :limittext :of :spacer, etc.
I copied the tags from a javascript library (I forget which).
Should it be a list of tags for html4.0? or xhtml? (off hand I don't know if that would be the same list or not) or is the intention that I bind this to the list that is appropriate for me in which case maybe it should start out as an empty list.
I think we should provide a proper list of default values for xhtml (or whatever the most common standard people use). If you can research and come up with an updated list of tags I think Edi will be happy to take it in. Regards, -- Mac

On Mon, 28 May 2007 09:41:45 +1000, "Simon Cusack" <scusack@fastmail.com.au> wrote:
I changed (member tag *html-empty-tags*) to (member tag *html-empty-tags* :test #'string-equal)
Thanks, your fix is in the new release.
participants (3)
-
Edi Weitz
-
Mac Chan
-
Simon Cusack