Ticket #4605 (closed defect: wontfix)

Opened 1 year ago

Last modified 4 months ago

input tags misformatted

Reported by: jaddle Assigned to: anonymous
Priority: normal Milestone:
Component: General Version: 2.2.1
Severity: normal Keywords: has-patch 2nd-opinion formatting forms input br
Cc:

Description

I tried creating a form in a page - but the formatting is not working properly.

When I enter, for example:

Your name: <input name="submittername" type="text"/><br />
Your E-mail address: <input name="submitteremail" type="text" />

wordpress then modifies it to look like this when you view the page:

name:<br />
<input name="submittername" type="text"/>
Your E-mail address:<br />
<input name="submitteremail" type="text" />

It's putting in a br tag before each input tag, and not putting them in where I actually made line breaks.

Note that the code is not actually being altered - if I edit it again, I see the original code I wrote. It's just when it's rendered for viewing the page that I get the modified version.

Also, I'm not using the visual editor at all - it's disabled in my profile - so I don't imagine it could be at fault here.

Attachments

blockelements.patch (0.9 kB) - added by hakre on 08/10/07 10:18:17.
(x)html-block-elements-name cleanup and sort

Change History

07/10/07 18:15:39 changed by Otto42

  • component changed from Administration to General.

For some reason, "input" is part of the $allblocks list in wpautop() in formatting.php... Which is odd, because input is an inline element, not a block element. I think that input should be removed from that list.

07/10/07 18:42:41 changed by foolswisdom

  • milestone set to 2.4 (future).

08/09/07 10:28:34 changed by hakre

Take a look here as well: http://trac.wordpress.org/ticket/4716

This seems to be related to this Issue in some kind and gives an additional insight in <br/> and form element related issues. (WP 2.2.2)

08/09/07 13:28:03 changed by Otto42

hakre: No, this is unrelated to #4716.

08/10/07 10:17:32 changed by hakre

But it might cause the Problem I was reporting there as well. I have now removed INPUT from that list and now this turns out very well in my reported problem.

<hr> should be removed there as well as <select> and <style>. additionally it would make sense to sort this alphabetically for a better overview.

I made a patch against current svn.

08/10/07 10:18:17 changed by hakre

  • attachment blockelements.patch added.

(x)html-block-elements-name cleanup and sort

08/10/07 17:43:00 changed by hakre

  • keywords changed from formatting, forms, input, br to formatting forms input br has-patch.

08/22/07 13:24:04 changed by hakre

  • keywords changed from formatting forms input br has-patch to has-patch 2nd-opinion formatting forms input br.

03/09/08 07:00:29 changed by azaozz

  • status changed from new to closed.
  • resolution set to wontfix.
  • milestone deleted.

Forms are best added in custom templates, not in the Post area. Templates can include any html, php, js, etc. and are much better suited for this.