Ticket #4605 (closed defect (bug): wontfix)

Opened 5 years ago

Last modified 4 years ago

input tags misformatted

Reported by: jaddle Owned by: 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 Download (913 bytes) - added by hakre 5 years ago.
(x)html-block-elements-name cleanup and sort

Change History

  • 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.

  • Milestone set to 2.4 (future)

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)

hakre: No, this is unrelated to #4716.

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.

hakre5 years ago

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

  • Keywords formatting forms input has-patch added; formatting, forms, input, removed
  • Keywords 2nd-opinion added
  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone 2.5 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.

Note: See TracTickets for help on using tickets.