Bug 12735

Summary: innerHTML for <pre> element is not markup but = innerText
Product: WebKit Reporter: Stefan Frey <stele>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Trivial CC: abob, ap, justin.garcia, msamuel
Priority: P4 Keywords: InRadar
Version: 420+   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Check the innerHTML in the WebInspector! none

Description Stefan Frey 2007-02-11 10:18:55 PST
if a page contains something like

<pre>
   some text describing markup, eg &lt;b&gt;
</pre>

the html returned by inner/outerHTML of any of its parents is

<pre>
   some text describing markup, eg <b>
</pre>

I assume that "startMarkup" in "markup.cpp" should not call "stringValueForRange" for a "preTag", but use the reular path. If I remove the preTag from the "if" at the beginning of the "case Node::TEXT_NODE" I get the desired result.
Comment 1 Stefan Frey 2007-02-12 01:50:09 PST
Created attachment 13126 [details]
Check the innerHTML in the WebInspector!
Comment 2 Darin Adler 2007-02-12 11:45:49 PST
*** Bug 12744 has been marked as a duplicate of this bug. ***
Comment 3 Darin Adler 2007-02-12 11:46:14 PST
Bug 12744 has a good test case.
Comment 4 Geoffrey Garen 2007-02-12 12:17:53 PST
I think a dup of this is in radar, assigned to Justin.
Comment 5 Justin Garcia 2007-03-02 13:45:42 PST
<rdar://problem/4545040>
Comment 6 Justin Garcia 2007-03-02 14:55:41 PST
r19948
Comment 7 Justin Garcia 2007-03-02 15:16:07 PST
r19949