Closed Bug 646954 Opened 13 years ago Closed 13 years ago

div tag inside p tag terminates p

Categories

(Core :: DOM: HTML Parser, defect)

x86_64
Linux
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: iranian.secure, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110323 Iceweasel/3.5.16 (like Firefox/3.5.16)
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110323 Iceweasel/3.5.16 (like Firefox/3.5.16)

when using <div> inside <p>, first <p> tag is closed, then <div> starts, this example can show the problem:
<p style="border:1px solid #00FF00">
	test1
	<div>test2</div>
</p>

there should be border around whole text, but it is not, also when I select all all the text and use "View Selection Source" it is shown like this:
<p style="border: 1px solid rgb(0, 255, 0);">
	test1
	</p><div>test2</div>
<p></p>

which is wrong!

Reproducible: Always

Steps to Reproduce:
using this code demonstrates the problem:
<p style="border:1px solid #00FF00">
	test1
	<div>test2</div>
</p>

Actual Results:  
the code above is translated to this:
<p style="border: 1px solid rgb(0, 255, 0);">
	test1
	</p><div>test2</div>
<p></p>


Expected Results:  
it should have produces this code:
<p style="border: 1px solid rgb(0, 255, 0);">
	test1
	<div>test2</div>
</p>
Yes, the HTML spec requires this behavior.  And more importantly, web sites depend on it.
Resolving INVALID in the sense that the allegation about the behavior is correct but the behavior is not a bug.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.