From: joey Date: Sun, 8 Jul 2007 16:46:38 +0000 (+0000) Subject: fairly complete support for outputting html 4.01 instead of xhtml X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/583cfab61438289db843a9c01d66f362efb77e01?hp=--cc fairly complete support for outputting html 4.01 instead of xhtml still todo: * the javascript inlined for toggle somehow fails to validate as html * the doc wiki still mentions xhtml all over * testing! --- 583cfab61438289db843a9c01d66f362efb77e01 diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm index 5d666e1be..8ac2ad518 100644 --- a/IkiWiki/Plugin/graphviz.pm +++ b/IkiWiki/Plugin/graphviz.pm @@ -66,11 +66,11 @@ sub render_graph (\%) { #{{{ eval q{use MIME::Base64}; error($@) if $@; return ""; + encode_base64($png)."\">"; } } - return "\n"; + return "\n"; } #}}} sub graph (@) { #{{{ diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index c5b08f604..227c56af4 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -44,8 +44,7 @@ sub scrubber { #{{{ selected shape size span src start summary tabindex target title type usemap valign value vspace width - }, "/" => 1, # emit proper
XHTML - }], + }}], ); return $_scrubber; } # }}} diff --git a/IkiWiki/Plugin/htmltidy.pm b/IkiWiki/Plugin/htmltidy.pm index cd5dc83ac..32e9b3618 100644 --- a/IkiWiki/Plugin/htmltidy.pm +++ b/IkiWiki/Plugin/htmltidy.pm @@ -22,7 +22,7 @@ sub sanitize (@) { #{{{ my $pid; my $sigpipe=0; $SIG{PIPE}=sub { $sigpipe=1 }; - $pid=open2(*IN, *OUT, 'tidy -quiet -asxhtml -utf8 --show-body-only yes --show-warnings no --tidy-mark no'); + $pid=open2(*IN, *OUT, 'tidy -quiet -ashtml -utf8 --show-body-only yes --show-warnings no --tidy-mark no'); # open2 doesn't respect "use open ':utf8'" binmode (IN, ':utf8'); diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index a453a49ba..7d74ed424 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -101,7 +101,7 @@ sub preprocess (@) { #{{{ '" height="'.$im->Get("height").'"'. (exists $params{class} ? ' class="'.$params{class}.'"' : ''). (exists $params{id} ? ' id="'.$params{id}.'"' : ''). - ' />'; + '>'; } #}}} 1 diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 08e1f2769..77932f60d 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -233,7 +233,7 @@ sub preprocess_inline (@) { #{{{ writefile($rssp, $config{destdir}, genfeed("rss", $rssurl, $desc, $params{page}, @list)); $toping{$params{page}}=1 unless $config{rebuild}; - $feedlinks{$params{destpage}}=qq{}; + $feedlinks{$params{destpage}}=qq{}; } if ($atom) { my $atomp=atompage($params{page}); @@ -241,7 +241,7 @@ sub preprocess_inline (@) { #{{{ writefile($atomp, $config{destdir}, genfeed("atom", $atomurl, $desc, $params{page}, @list)); $toping{$params{page}}=1 unless $config{rebuild}; - $feedlinks{$params{destpage}}=qq{}; + $feedlinks{$params{destpage}}=qq{}; } } diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index ca8898679..e747ac968 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -26,16 +26,19 @@ sub htmlize (@) { #{{{ eval q{use Markdown}; if (! $@) { $markdown_sub=\&Markdown::Markdown; + $Markdown::g_empty_element_suffix=">"; # HTML output } else { eval q{use Text::Markdown}; if (! $@) { $markdown_sub=\&Text::Markdown::Markdown; + $Text::Markdown::g_empty_element_suffix=">"; # HTML output } else { do "/usr/bin/markdown" || error(sprintf(gettext("failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)"), $@, $!)); $markdown_sub=\&Markdown::Markdown; + $Markdown::g_empty_element_suffix=">"; # HTML output } } require Encode; diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 184146cfe..731d9da76 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -57,7 +57,7 @@ sub preprocess (@) { #{{{ if (%params) { $meta{$page}.=scrub("\n"); + ">\n"); } else { # hidden WikiLink @@ -69,7 +69,7 @@ sub preprocess (@) { #{{{ } elsif ($key eq 'permalink') { $permalink{$page}=$value; - $meta{$page}.=scrub("\n"); + $meta{$page}.=scrub("\n"); } elsif ($key eq 'date') { eval q{use Date::Parse}; @@ -90,19 +90,19 @@ sub preprocess (@) { #{{{ $meta{$page}.='\n"; + "\" style=\"text/css\">\n"; } elsif ($key eq 'openid') { if (exists $params{server}) { $meta{$page}.='\n"; + "\" rel=\"openid.server\">\n"; } $meta{$page}.='\n"; + "\" rel=\"openid.delegate\">\n"; } else { $meta{$page}.=scrub("\n"); + "\" content=\"".encode_entities($value)."\">\n"); if ($key eq 'author') { $author{$page}=$value; } diff --git a/IkiWiki/Plugin/poll.pm b/IkiWiki/Plugin/poll.pm index 63c93c62d..b0682669e 100644 --- a/IkiWiki/Plugin/poll.pm +++ b/IkiWiki/Plugin/poll.pm @@ -57,13 +57,13 @@ sub preprocess (@) { #{{{ $ret.="$choice ($choices{$choice})\n"; } if ($open && exists $config{cgiurl}) { - $ret.="\n"; - $ret.="\n"; - $ret.="\n"; - $ret.="\n"; - $ret.="\n"; + $ret.="\n"; + $ret.="\n"; + $ret.="\n"; + $ret.="\n"; + $ret.="\n"; } - $ret.="

\n
\n"; + $ret.="

\n
\n"; if ($open && exists $config{cgiurl}) { $ret.="\n"; } diff --git a/IkiWiki/Plugin/sparkline.pm b/IkiWiki/Plugin/sparkline.pm index 69b3512c2..1c972943e 100644 --- a/IkiWiki/Plugin/sparkline.pm +++ b/IkiWiki/Plugin/sparkline.pm @@ -152,11 +152,11 @@ sub preprocess (@) { #{{{ eval q{use MIME::Base64}; error($@) if $@; return ""; + encode_base64($png)."\">"; } } - return 'graph'; + return 'graph'; } # }}} 1 diff --git a/IkiWiki/Plugin/toc.pm b/IkiWiki/Plugin/toc.pm index 797bfc6bd..bc62f71d6 100644 --- a/IkiWiki/Plugin/toc.pm +++ b/IkiWiki/Plugin/toc.pm @@ -47,7 +47,7 @@ sub format (@) { #{{{ if ($tagname =~ /^h(\d+)$/i) { my $level=$1; my $anchor="index".++$anchors{$level}."h$level"; - $page.="$text"; + $page.="$text"; # Take the first header level seen as the topmost level, # even if there are higher levels seen later on. diff --git a/debian/NEWS b/debian/NEWS index 7a5808ac0..61e66e3d0 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,23 @@ +ikiwiki (2.4) unstable; urgency=low + + Ikiwiki now outputs HTML 4.01, not XHTML 1.0. For the many reasons, see + http://www.hixie.ch/advocacy/xhtml and note that even if a web server is + set up to serve XHTML appropriately as application/xhtml+xml, mozilla + doesn't support that mime type. + + It's possible that your wiki contains some hardcoded XHTML tags. No + need to worry about these too much though. Since before ikiwiki generated + XHTML before, but your web server almost certianly served it up as + text/html, web browsers actually were processing it as HTML all along and + if an XHTML tag worked before, it will continue to work. Also, + both the htmlscrubber and htmlsanitizer modules will convert any such + XHTML tags to valid HTML tags. + + You might want to rebuild your wiki on upgrade to this version, to switch + everything over to HTML 4.01 at once. + + -- Joey Hess Sun, 08 Jul 2007 11:55:00 -0400 + ikiwiki (2.1) unstable; urgency=low Some wikis need to be rebuilt on upgrade to this version, due to changes to diff --git a/debian/changelog b/debian/changelog index d946f12e1..ade01140d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (2.4) UNRELEASED; urgency=low + + * Ikiwiki now outputs HTML 4.01, not XHTML 1.0. See the NEWS file for + details. Closes: #432045 + + -- Joey Hess Sun, 08 Jul 2007 11:51:29 -0400 + ikiwiki (2.3) unstable; urgency=low * Corrected a typo in an error handler in the image plugin. diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 4c8756f89..28a2b89e6 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-06-29 20:49-0400\n" +"POT-Creation-Date: 2007-07-08 12:25-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -208,7 +208,7 @@ msgstr "" msgid "%s is locked by %s and cannot be edited" msgstr "" -#: ../IkiWiki/Plugin/mdwn.pm:37 +#: ../IkiWiki/Plugin/mdwn.pm:39 #, perl-format msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" diff --git a/templates/archivepage.tmpl b/templates/archivepage.tmpl index 6bc789dfb..9eceee2e4 100644 --- a/templates/archivepage.tmpl +++ b/templates/archivepage.tmpl @@ -1,5 +1,5 @@

-
+
Posted diff --git a/templates/atomitem.tmpl b/templates/atomitem.tmpl index 9190fcc84..16effda06 100644 --- a/templates/atomitem.tmpl +++ b/templates/atomitem.tmpl @@ -15,10 +15,6 @@ - -

- -
- + ]]> diff --git a/templates/blogpost.tmpl b/templates/blogpost.tmpl index 7eeede603..c044f51b0 100644 --- a/templates/blogpost.tmpl +++ b/templates/blogpost.tmpl @@ -6,11 +6,11 @@ Atom - - - + + + - - + + diff --git a/templates/editpage.tmpl b/templates/editpage.tmpl index 08f160881..d418bac69 100644 --- a/templates/editpage.tmpl +++ b/templates/editpage.tmpl @@ -1,14 +1,14 @@ - + - - + + <TMPL_VAR FORM-TITLE> - - + + - + @@ -65,20 +65,20 @@ together before saving. Page location: Page type: -
+
-
+
-Optional comment about this change:
-
+Optional comment about this change:
+
- + -
+
Page preview:
diff --git a/templates/misc.tmpl b/templates/misc.tmpl index 32e2c934e..9ce3c42fd 100644 --- a/templates/misc.tmpl +++ b/templates/misc.tmpl @@ -1,14 +1,14 @@ - + - - + + <TMPL_VAR TITLE> - - + + - + diff --git a/templates/page.tmpl b/templates/page.tmpl index fd44a53be..05c8af7a8 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -1,14 +1,14 @@ - + - + <TMPL_VAR TITLE> - + - - + + @@ -42,7 +42,7 @@
  • Preferences
  • -

  • +

  • diff --git a/templates/recentchanges.tmpl b/templates/recentchanges.tmpl index e954503f8..6e95e5b8a 100644 --- a/templates/recentchanges.tmpl +++ b/templates/recentchanges.tmpl @@ -1,14 +1,14 @@ - + - - + + <TMPL_VAR TITLE> - - + + - + @@ -20,7 +20,7 @@
    -
    +
    @@ -39,7 +39,7 @@ "> - diff + diff @@ -53,7 +53,7 @@ diff --git a/templates/searchform.tmpl b/templates/searchform.tmpl index 7c4fdb026..d449c784e 100644 --- a/templates/searchform.tmpl +++ b/templates/searchform.tmpl @@ -1,7 +1,7 @@
    - - - + + +
    -
    +