trivial patch for matrix them to make html more valid
|
morgad
Joined: 2007-08-11
Posts: 39 |
Posted: Sat, 2007-12-01 10:17
|
|
Hi, gallery2/themes/matrix/templates/local# diff -u ../theme.tpl theme.tpl
--- ../theme.tpl 2006-12-01 21:14:46.000000000 +0000
+++ theme.tpl 2007-11-30 20:57:52.000000000 +0000
@@ -5,7 +5,7 @@
* version. Gallery will look for that file first and use it if it exists.
*}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html lang="{g->language}">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{g->language}" lang="{g->language}">
<head>
{* Let Gallery print out anything it wants to put into the <head> element *}
{g->head}
it might apply to other themes as well, is it worth applying? Dave |
|

Posts: 25940
Thanks for that.
Please add patches here as well:
http://sourceforge.net/tracker/?group_id=7130&atid=307130
they are racked a bit better than the forums.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 32509
the svn version has the xmlns attribute already.
please always consult the svn version before reprting bugs / filing patches.
thanks.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 8
well I made a little fix too :
*** gallery/themes/matrix/templates/album.tpl 2007-01-12 23:05:05.000000000 +0 100 --- album.tpl 2007-12-02 01:50:37.000000000 +0100 *************** *** 9,15 **** {if !empty($theme.params.sidebarBlocks)} <td id="gsSidebarCol"> {g->theme include="sidebar.tpl"} - </td> <script type="text/javascript"> {* hide the sidebar if there's nothing in it *} // <![CDATA[ --- 9,14 ---- *************** *** 19,24 **** --- 18,24 ---- if (!text || !text.match(/\S/)) el.style.display = 'none'; // ]]> </script> + </td> {/if} <td> <div id="gsContent" class="gcBorder1">I hope I dont break anything :P
this fixes :
Line 84, Column 30: document type does not allow element "script" here; missing one of "th", "td" start-tag .
<script type="text/javascript">
Posts: 32509
if i remember correctly, this one's fixed since half a year too.
please check nightly snapshots / the svn version before ...
see above.
thanks.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 8
jebus why didnt that make it into the latest stable release ? I mean half a year ^^.
aparently its been fixed :
revision 16349, Wed Apr 25 22:36:13 2007 UTC
Bug 1706509: [G2] Doesn't validate as XHTML 1.0
Move the sidebar collapse <script> tag into the subsequent <td>
element so that it's legal XHTML 1.0. This still looks fine on FF2
and IE6. Review #232.
...
wooo 7 months ?
Posts: 32509
2.2 is from April. this has been discovered and fixed shortly after that.
see: http://fisheye3.cenqua.com/browse/gallery/trunk/gallery2/themes/matrix/templates/album.tpl?r1=16235&r2=16349
it's not a critical issue and thus has not been part of any of the security / stability releases since (2.2.1-2.2.3).
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 25940
So, that means you will see it in G2.3.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 8
hehe , aparently i was writing my post while i got the answer ^^.
thanks for the quick reply