Patch to fix Atom validation
Martijn van de Streek <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello again, I've made a small patch to the default 'atom' flavour that makes it validate (in the eyes of feedvalidator.org). It changes the content-type from 'text/xml' to 'application/atom+xml' (which has the side-effect that the '$blog_encoding' from the <?xml> tag is parsed, instead of it defaulting to US-ASCII as with the 'text/xml' type; yes, this is what the standards say..) It also adds a ?flav=atom to the 'self' link. This might not be the best way to do it, but I couldn't think of any other way of reliably linking to 'self' (with the proper flavour).. if anyone has a better idea, please tell me :) Martijn -- Sorry isn't an excuse when you do something stupid on purpose. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Pyblosxom-devel mailing list Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel
pyblosxom-atomvalidate.patch
(text/plain, 1012 B)
diff -ur pyblosxom-1.3.2/Pyblosxom/flavours/atom.flav/content_type.atom pyblosxom-1.3.2-atomvalidate/Pyblosxom/flavours/atom.flav/content_type.atom --- pyblosxom-1.3.2/Pyblosxom/flavours/atom.flav/content_type.atom 2005-10-06 18:34:03.000000000 +0200 +++ pyblosxom-1.3.2-atomvalidate/Pyblosxom/flavours/atom.flav/content_type.atom 2006-09-07 12:54:41.000000000 +0200 @@ -1 +1 @@ -text/xml +application/atom+xml diff -ur pyblosxom-1.3.2/Pyblosxom/flavours/atom.flav/head.atom pyblosxom-1.3.2-atomvalidate/Pyblosxom/flavours/atom.flav/head.atom --- pyblosxom-1.3.2/Pyblosxom/flavours/atom.flav/head.atom 2005-11-15 20:25:07.000000000 +0100 +++ pyblosxom-1.3.2-atomvalidate/Pyblosxom/flavours/atom.flav/head.atom 2006-09-07 12:54:20.000000000 +0200 @@ -7,7 +7,7 @@ ]]></subtitle> <id>$url</id> <link rel="alternate" type="text/html" href="$base_url" /> -<link rel="self" type="text/xml" href="$url" /> +<link rel="self" type="application/atom+xml" href="$url?flav=atom" /> <author> <name>$blog_author</name>
signature.asc
(application/pgp-signature, 191 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFE//xPDafvoz+l4DERAhXTAJ9t+9XHAiqUJuzimUvvCwMeIyNCJwCeOgdS NT8DifB2kIB7qr+3xrrbPRQ= =CR5g -----END PGP SIGNATURE-----