[sword-devel] filter <!P> patch
chrislit at crosswire.org
Thu Dec 13 22:03:06 MST 2012
On 12/13/2012 5:45 PM, cricketc at gmail.com wrote:
> I came across the following output in various filters: <!P>. A comment
> in the code talks about this being a silent html comment that the
> front-ends can replace if desired. However, that tag is not valid
> (x)html (I guess it used to be a valid comment).
> I'm attaching a patch that replaces <!P> with <!--p-->, so that it's
> valid html or xhtml output, in all the filters where I found <!P>.
> If anyone would be willing to commit this, that would be great. Or, if
> there are changes/improvements/problems with the patch, please let me
I'll commit some changes that reflect your intentions here, but most of
the files for which you suggest changes are not problematic. We target
three flavors of HTML:
HTML, which should not have <!P> since it's not valid HTML
XHTML, which should not have <!P> since it's not valid XHTML
and HTMLHREF, which can have <!P> since HTMLHREF is basically a
private-use variant of HTML
(There's also the WEBIF output format, but <!P> doesn't seem to appear
Most of the uses of <!P> are found in the HTMLHREF filters, and I
believe almost all front ends use these filters. Nothing will change in
those filters, so nothing need be changed in front ends using HTMLHREF.
The other large set of uses of <!P> were in XHTML filters, which I
suspect are not used by anyone since they're a new addition to the
library. <!P> was still in those because they were copied from the
HTMLHREF filters and no one has put much work into making them more
XHTML-y. Part of the reason for adding XHTML filters is simply to make
output more standards-conformant, so we should naturally want to get rid
of <!P> in those.
I would guess that keeping <!P> in HTMLHREF output and removing it from
HTML & XHTML output satisfies everyone.
More information about the sword-devel