Last modified: 2014-09-23 23:31:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12932 - Add <form> to list of non-paragraph-mode tags
Add <form> to list of non-paragraph-mode tags
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.11.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: newparser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-06 00:27 UTC by ahel
Modified: 2014-09-23 23:31 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Add <form and </form to $openmatch and $closematch, respectively, in Parser.php (969 bytes, patch)
2008-02-06 00:27 UTC, ahel
Details

Description ahel 2008-02-06 00:27:10 UTC
Created attachment 4618 [details]
Add <form and </form to $openmatch and $closematch, respectively, in Parser.php

Currently, users of SimpleForms cannot produce pages that validate. The reason is that the form tag is forced by the parser into paragraph mode. The <form> tag isn't allowed inside paragraphs. Moreover, the paragraph tag also ends up being closed incorrectly. Here's a slightly doctored example:

{{#form: 
{{#input: type = hidden | name  = title | value = Completed form}} 
{{#input: type = hidden | name  = formmailer | value = formmailer}}
{{{!}}
! align=right {{!}} Test:
{{!}} {{#input: type = text | name  = test }}
{{!}}}
}}

With the 1.11.0 MediaWiki, I get this:

<p>
<form action="/blah" id="sf-47a8f52225ef1"><input type="hidden" name="title" value="Completed form"/> 
<input type="hidden" name="formmailer" value="formmailer"/>
</p>
<table>
<tr>
<th align="right"> Test:
</th><td> <input type="text" name="test"/>
</td></tr></table></form>

That's not valid HTML. With the fix (see attachment), I get this:

<form action="/~lesha/us13/index.php" id="sf-47a8fd25c4e8f"><input type="hidden" name="title" value="Completed form"/> 
<input type="hidden" name="formmailer" value="formmailer"/>
<table>
<tr>
<th align="right"> Test:
</th><td> <input type="text" name="test"/>
</td></tr></table></form>

I think this fix shouldn't have any negative side effects.
Comment 1 Sumana Harihareswara 2012-01-10 22:48:40 UTC
ahel, thank you for the patch.  I'm sorry, but in the time since you provided
your patch, MediaWiki's codebase has changed enough that your patch no longer
applies cleanly to trunk.  Therefore I'm marking it obsolete and removing the
"need-review" and "patch" keywords.

We are currently working on a rewrite of the parser, so I'm cc'ing Gabriel Wicke, who is working on that.  If the <form> issue is still one you're interested in working on, please join us in IRC
https://www.mediawiki.org/wiki/MediaWiki_on_IRC and talk with other developers -- maybe you can help with the rewrite.  Thanks for your interest in improving MediaWiki!
Comment 2 Sumana Harihareswara 2012-01-10 22:49:28 UTC
Comment on attachment 4618 [details]
Add <form and </form to $openmatch and $closematch, respectively, in Parser.php

This patch no longer applies to trunk per Rusty Burchfield's automated testing
https://docs.google.com/spreadsheet/ccc?key=0Ah_71HHl7qa7dGtvSms3TGpHQU9NU2Y1VmNzUEUteWc
.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links