Closed Bug 367602 Opened 18 years ago Closed 15 years ago

html parser just *eats* PHP tags <? foo ?>, so they don't appear in DOM or innerHTML

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gavi.narra, Unassigned)

References

()

Details

(Whiteboard: [fixed by the HTML5 parser])

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 In javascript code, when I try to get innerHTML of HTML element that contains some text patterns like "<?", the section is ignored. Sample Code: http://www.objectgraph.com/download/bug.html My Blog Entry (Test result both IE and Mozilla): http://blog.objectgraph.com/2007/01/bug-in-mozilla.html#links Reproducible: Always Steps to Reproduce: 1.Create a pre html tag that contains text sequence like <? 2.Get id of the pre tag 3.Retrive innerHTML from the HTML element Actual Results: The section between <? and ?> in innerHTML is ignored Expected Results: The entire innerHTML including text between <? and ?> should be returned in innerHTML
Summary: innerHTML has problem with a particualr string sequence → innerHTML has problem with a particular string sequence
Using DOM Inspector, you can see that it's the HTML parser that's not doing what you want (rather than the serialization for innerHTML). data:text/html,foo<?bar?>baz See also bug 59985. But I don't think this is a dup; bug 59985 might only affect Composer.
Assignee: nobody → mrbkap
Component: General → HTML: Parser
Product: Firefox → Core
QA Contact: general → parser
Summary: innerHTML has problem with a particular string sequence → html parser just *eats* PHP tags <? foo ?>, so they don't appear in DOM or innerHTML
Version: unspecified → Trunk
Confirmed (Mac trunk), but I'm not convinced this should be fixed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I created a simple colorizer application that colorizes code in webpages by sending it to the server. So it does read the dom tree to find all pre tags. I noticed that it doesnt work with php code. http://www.pygments.com Anyway, just trying to make a case to fix this issue:-). Looks like safari also has this bug!!
Assignee: mrbkap → nobody
No longer eaten. Treated as a bogus comment per HTML5. (The reporter's "expected results" is INVALID per spec.)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by the HTML5 parser]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: