On 08/11/2007, Dan Scott <[EMAIL PROTECTED]> wrote:
> With some of the recent XHTML cleanup I've been doing of the OPAC, I
> had become aware that mod_xmlent was treating every element as though
> it would contain content, and therefore changed empty elements like
> <link blah />, <img blah />, and <br /> to <link blah></link>, <img
> blah></img>, and <br></br>.
>
> Not heinous, but I figured we should be able to do better than that.
> So I pulled the list of empty elements from xhtml1-transitional.dtd
> and modified mod_xmlent.c to treat empty elements properly.
>
> I'm posting this to the list rather than applying it directly in case
> my semi-rusty C has any obvious "oops!" moments in it. If there's no
> objection or stated need for reworking the patch, I'll apply it in a
> day or two.

Hah - attached is a quick revision, because I forgot to limit the
cases for tag-minimization to those where content-type = 'text/html'
(in case we're parsing other file types).

-- 
Dan Scott
Laurentian University

Attachment: mod_xmlent.c.take2.patch
Description: Binary data

Reply via email to