From d238fd1b04b41b17cc9cb444d6dcee498d6a14c5 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 8 May 2010 23:38:35 +0000 Subject: bug with pubdate, in process of testing fix --- ...e_wrong_when_using_xhtml5___34__mode__34__.mdwn | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn (limited to 'doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn') diff --git a/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn b/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn new file mode 100644 index 000000000..c55b3f62d --- /dev/null +++ b/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn @@ -0,0 +1,40 @@ +Hi, + +XML error: + + Created + +The pubdate REQUIRES a date, so e.g. `pubdate="2009-03-24T18:02:14Z"` + +Otherwise the XML parser chokes. + + + +
+diff --git a/IkiWiki.pm b/IkiWiki.pm
+index 1f2ab07..6ab5b56 100644
+--- a/IkiWiki.pm
++++ b/IkiWiki.pm
+@@ -1004,7 +1004,7 @@ sub displaytime ($;$$) {
+    my $time=formattime($_[0], $_[1]);
+    if ($config{html5}) {
+        return '';
+    }
+    else {
+diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm
+index fe8ef09..8c4a1b4 100644
+--- a/IkiWiki/Plugin/relativedate.pm
++++ b/IkiWiki/Plugin/relativedate.pm
+@@ -59,7 +59,7 @@ sub mydisplaytime ($;$$) {
+ 
+    if ($config{html5}) {
+        return '';
+    }
+    else {
+        return '';
+
-- cgit v1.2.3 From 6512423f159a0917137b2caca3fa244147dd0131 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 8 May 2010 23:42:45 +0000 Subject: fixed patch display... --- ...e_wrong_when_using_xhtml5___34__mode__34__.mdwn | 54 +++++++++++----------- 1 file changed, 28 insertions(+), 26 deletions(-) (limited to 'doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn') diff --git a/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn b/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn index c55b3f62d..2dd0d945f 100644 --- a/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn +++ b/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn @@ -10,31 +10,33 @@ Otherwise the XML parser chokes. +(indented exactly 4 spaces) +
-diff --git a/IkiWiki.pm b/IkiWiki.pm
-index 1f2ab07..6ab5b56 100644
---- a/IkiWiki.pm
-+++ b/IkiWiki.pm
-@@ -1004,7 +1004,7 @@ sub displaytime ($;$$) {
-    my $time=formattime($_[0], $_[1]);
-    if ($config{html5}) {
-        return '';
-    }
-    else {
-diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm
-index fe8ef09..8c4a1b4 100644
---- a/IkiWiki/Plugin/relativedate.pm
-+++ b/IkiWiki/Plugin/relativedate.pm
-@@ -59,7 +59,7 @@ sub mydisplaytime ($;$$) {
- 
-    if ($config{html5}) {
-        return '';
-    }
-    else {
-        return '';
+    diff --git a/IkiWiki.pm b/IkiWiki.pm
+    index 1f2ab07..6ab5b56 100644
+    --- a/IkiWiki.pm
+    +++ b/IkiWiki.pm
+    @@ -1004,7 +1004,7 @@ sub displaytime ($;$$) {
+        my $time=formattime($_[0], $_[1]);
+        if ($config{html5}) {
+            return '<time datetime="'.date_3339($_[0]).'"'.
+    -         ($_[2] ? ' pubdate' : '').
+    +           ($_[2] ? ' pubdate="'.date_3339($_[0]).'"' : '').
+                '>'.$time.'</time>';
+        }
+        else {
+    diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm
+    index fe8ef09..8c4a1b4 100644
+    --- a/IkiWiki/Plugin/relativedate.pm
+    +++ b/IkiWiki/Plugin/relativedate.pm
+    @@ -59,7 +59,7 @@ sub mydisplaytime ($;$$) {
+     
+        if ($config{html5}) {
+            return '<time datetime="'.IkiWiki::date_3339($time).'"'.
+    -         ($pubdate ? ' pubdate' : '').$mid.'</time>';
+    +           ($pubdate ? ' pubdate="'.IkiWiki::date_3339($time).'"' : '').$mid.'</time>';
+        }
+        else {
+            return '<span'.$mid.'</span>';
 
-- cgit v1.2.3 From bc0aa4d40e10238f6b83e285869caab3dfeca395 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 May 2010 19:45:02 -0400 Subject: Use xhtml friendly pubdate setting. --- IkiWiki.pm | 2 +- IkiWiki/Plugin/relativedate.pm | 2 +- debian/changelog | 1 + ...lement__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn') diff --git a/IkiWiki.pm b/IkiWiki.pm index d76b5edb4..33e4e1d1f 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1004,7 +1004,7 @@ sub displaytime ($;$$) { my $time=formattime($_[0], $_[1]); if ($config{html5}) { return ''; } else { diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index fe8ef0901..179f9238c 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -59,7 +59,7 @@ sub mydisplaytime ($;$$) { if ($config{html5}) { return ''; } else { return ''; diff --git a/debian/changelog b/debian/changelog index 730cae1e2..e6c5e42ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,7 @@ ikiwiki (3.20100505) UNRELEASED; urgency=low * calendar: Allow negative month to be specified. -1 is last month, etc. (And also negative years.) * calendar: Display year in title of month calendar. + * Use xhtml friendly pubdate setting. -- Joey Hess Wed, 05 May 2010 18:07:29 -0400 diff --git a/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn b/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn index 2dd0d945f..1f6bdb333 100644 --- a/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn +++ b/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn @@ -6,6 +6,9 @@ XML error: The pubdate REQUIRES a date, so e.g. `pubdate="2009-03-24T18:02:14Z"` +> No, `pubdate="pubdate"`. It's a boolean attribute. applied && [[done]] +> --[[Joey]] + Otherwise the XML parser chokes. -- cgit v1.2.3 From d379d8ab9dc999da6dcd3212634e9d2dc97d7a3e Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 8 May 2010 23:55:47 +0000 Subject: --- ..._element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn') diff --git a/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn b/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn index 1f6bdb333..def5bcc2a 100644 --- a/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn +++ b/doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn @@ -8,6 +8,7 @@ The pubdate REQUIRES a date, so e.g. `pubdate="2009-03-24T18:02:14Z"` > No, `pubdate="pubdate"`. It's a boolean attribute. applied && [[done]] > --[[Joey]] +>> awesome, thanks for fixing my fix ;) --[[simonraven]] Otherwise the XML parser chokes. -- cgit v1.2.3