summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-08 19:42:20 -0400
committerJoey Hess <joey@kitenet.net>2010-05-08 19:42:20 -0400
commita380fa0e6b3e18db86eb00ab235abfc75581a11d (patch)
tree0299d2f4d8bc1ec03356091f10c827d881dc61b6
parent8d80ad0c173f8d0fbd888a25486ac3f919337d78 (diff)
parentd238fd1b04b41b17cc9cb444d6dcee498d6a14c5 (diff)
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
-rw-r--r--doc/bugs/html5_time_element__39__s_pubdate_wrong_when_using_xhtml5___34__mode__34__.mdwn40
1 files changed, 40 insertions, 0 deletions
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 <time datetime="2009-03-24T18:02:14Z" pubdate class="relativedate" title="Tue, 24 Mar 2009 14:02:14 -0400">2009-03-24</time>
+
+The pubdate REQUIRES a date, so e.g. `pubdate="2009-03-24T18:02:14Z"`
+
+Otherwise the XML parser chokes.
+
+<http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#attr-time-pubdate>
+
+<pre>
+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>';
+</pre>