Description

The HTML generated by moinmoin 1.9 (any probably earlier) isn't valid HTML.

Steps to reproduce

  1. Edit a new page on http://master19.moimo.in

  2. Type "bla bla"
  3. Press preview
  4. Use the View source in your browser

  5. Paste the result in http://validator.w3.org/#validate_by_input+with_options

Example

Try validating this content:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="shortcut icon" href="http://static.moinmo.in/favicon.ico">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="robots" content="noindex,nofollow">

<title>Preview of "FrontPage" - 1.9 Master Wiki</title>
<script type="text/javascript" src="/moin_static190/common/js/common.js"></script>

<script type="text/javascript">
<!--
var search_hint = "Search";
//-->
</script>


<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="/moin_static190/modernized/css/common.css">

<link rel="stylesheet" type="text/css" charset="utf-8" media="screen" href="/moin_static190/modernized/css/screen.css">
<link rel="stylesheet" type="text/css" charset="utf-8" media="print" href="/moin_static190/modernized/css/print.css">
<link rel="stylesheet" type="text/css" charset="utf-8" media="projection" href="/moin_static190/modernized/css/projection.css">

<!-- css only for MS IE6/IE7 browsers -->
<!--[if lt IE 8]>
   <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="/moin_static190/modernized/css/msie.css">
<![endif]-->



<link rel="alternate" type="application/wiki" title="Edit" href="/4ct10n/edit/FrontPage?action=edit">

<script type="text/javascript" src="/moin_static190/common/js/countdown.js"></script>
<script type="text/javascript">
var countdown_timeout_min = 10
var countdown_lock_expire = "Your edit lock on FrontPage has expired!"
var countdown_lock_mins = "Your edit lock on FrontPage will expire in # minutes."
var countdown_lock_secs = "Your edit lock on FrontPage will expire in # seconds."
addLoadEvent(countdown)
</script>

<link rel="Start" href="/FrontPage">

<link rel="Alternate" title="Wiki Markup" href="/FrontPage?action=raw">
<link rel="Alternate" media="print" title="Print View" href="/FrontPage?action=print">
<link rel="Search" href="/FindPage">
<link rel="Index" href="/TitleIndex">
<link rel="Glossary" href="/WordIndex">
<link rel="Help" href="/HelpOnFormatting">
</head>

<body  lang="en" dir="ltr">

<div style="border:yellow; border-style:dotted; padding:0.5em; background-color:#FFFFCC;">
<b>Please note:</b> This is the <b>master19 wiki</b> for moin 1.9.x content.
For moin 1.8.x content, please see the <a href="http://master18.moinmo.in/FrontPage">same page in master18 wiki</a>.

</div>

<div id="header">
<h1 id="locationline">
<span id="pagelocation">Preview of "FrontPage"</span>
</h1>
<div id="message">
<p><p class="status">Other users will be <em>warned</em> until 2009-09-12 14:33:50 that you are editing this page.
Use the Preview button to extend the locking period.</p>
</p>
</div>

</div>

<div id="page" lang="en" dir="ltr">
<div dir="ltr" id="content" lang="en"><span class="anchor" id="top"></span>
<form id="editor" method="post" action="/FrontPage#preview" onSubmit="flgChange = false;"><fieldset style="border:none;padding:0;"><input type="hidden" name="action" value="edit"><input type="hidden" name="rev" value="67"><input type="hidden" name="ticket" value="004aabaef7.FrontPage.edit.de7d41849c440efc824bcf196c7fff8b93ad752d">
<input class="button" type="submit" name="button_save" value="Save Changes" onClick="flgChange = false;">
<input class="button" type="submit" name="button_preview" value="Preview" onClick="flgChange = false;">

<input class="button" type="submit" name="button_spellcheck" value="Check Spelling" onClick="flgChange = false;">
<input class="button" type="submit" name="button_cancel" value="Cancel">
<input type="hidden" name="editor" value="text">

<script type="text/javascript">
    <!--
    function toggle_trivial(CheckedBox)
    {
        TrivialBoxes = document.getElementsByName("trivial");
        for (var i = 0; i < TrivialBoxes.length; i++)
            TrivialBoxes[i].checked = CheckedBox.checked;
    }

    document.write('<input type="checkbox" name="trivial" id="chktrivialtop" value="1"  onclick="toggle_trivial(this)">');
    document.write('<label for="chktrivialtop">Trivial change</label>');
    //-->
</script> 
<div id="textcha">
<span id="textcha-question">A friend gives you an apple and eats one himself, he has none left. How many apples did he have before?</span>
<input type="hidden" name="textcha-question" value="A friend gives you an apple and eats one himself, he has none left. How many apples did he have before?">

<input id="textcha-answer" type="text" name="textcha-answer" value="" size="20" maxlength="80">
</div>
<script type="text/javascript">
    var flgChange = false;
    function confirmleaving() {
        if ( flgChange )
            return "Your changes are not saved!";
    }
</script>
<textarea id="editor-textarea" name="savetext" lang="en" dir="ltr" rows="20" cols="80"
          onChange="flgChange = true;" onKeyPress="flgChange = true;">TEST
</textarea><p>Comment: <input id="editor-comment" type="text" name="comment" value="" size="80" maxlength="200" onChange="flgChange = true;" onKeyPress="flgChange = true;"></p><p>Add to: <select name="category" size="1"><option value="">&lt;No addition&gt;</option><option value="CategoryCategory">CategoryCategory</option><option value="CategoryHomepage">CategoryHomepage</option></select>
&nbsp;

<input type="checkbox" name="trivial" id="chktrivial" value="1"  onclick="toggle_trivial(this)">
<label for="chktrivial">Trivial change</label>

&nbsp;
<input type="checkbox" name="rstrip" id="chkrstrip" value="1" >
<label for="chkrstrip">Remove trailing whitespace from each line</label>
</p></fieldset></form><div id="editor-help"><dl><dt>Emphasis</dt><dd>''<em>italics</em>''; '''<strong>bold</strong>'''; '''''<em><strong>bold italics</em></strong>'''''; ''<em>mixed </em>'''<em><strong>bold</strong>''' and italics</em>''; ---- horizontal rule. </dd><dt>Headings</dt><dd>= Title 1 =; == Title 2 ==; === Title 3 ===; ==== Title 4 ====; ===== Title 5 =====. </dd><dt>Lists</dt><dd>space and one of: * bullets; 1., a., A., i., I. numbered items; 1.#n start numbering at n; space alone indents. </dd><dt>Links</dt><dd>JoinCapitalizedWords; [[target|linktext]]. </dd><dt>Tables</dt><dd>|| cell text |||| cell text spanning 2 columns ||;    no trailing white space allowed after tables or titles. </dd></dl><img alt="(!)" height="16" src="/moin_static190/modernized/img/idea.png" title="(!)" width="16" /> For more help, see <a href="/HelpOnEditing">HelpOnEditing</a> or <a href="/HelpOnMoinWikiSyntax">HelpOnMoinWikiSyntax</a>.</div><div dir="ltr" id="preview" lang="en"><span class="anchor" id="top-1"></span>

<span class="anchor" id="line-1"></span><p class="line874">TEST <span class="anchor" id="line-2"></span><span class="anchor" id="bottom"></span></div><span class="anchor" id="bottom-1"></span></div>
<div id="pagebottom"></div>
</div>


<div id="footer">

<ul id="credits">
<li><a href="http://moinmo.in/" title="This site uses the MoinMoin Wiki software.">MoinMoin Powered</a></li><li><a href="http://moinmo.in/Python" title="MoinMoin is written in Python.">Python Powered</a></li><li><a href="http://moinmo.in/GPL" title="MoinMoin is GPL licensed.">GPL licensed</a></li><li><a href="http://validator.w3.org/check?uri=referer" title="Click here to validate this page.">Valid HTML 4.01</a></li>
</ul>


</div>
<ul id="timings">
<li>getACL = 0.004s</li>
<li>getPageList = 0.084s</li>
<li>i18n_init = 0.008s</li>
<li>init = 0.009s</li>
<li>loadLanguage = 0.000s</li>
<li>load_multi_cfg = 0.007s</li>
<li>run = 0.313s</li>
<li>send_page = 0.002s</li>

<li>send_page_content = 0.000s</li>
<li>total = 0.322s</li>
</ul>
</body>
</html>

Component selection

Details

MoinMoin Version

1.9 beta3

OS and Version

Python Version

2.5

Server Setup

master19.moinmo.in

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

English

Workaround

Discussion

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/InvalidHtmlInPreview (last edited 2009-09-12 14:26:27 by FranklinPiat)