Bug 12735 - innerHTML for <pre> element is not markup but = innerText
Summary: innerHTML for <pre> element is not markup but = innerText
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.5
: P4 Trivial
Assignee: Nobody
URL:
Keywords: InRadar
: 12744 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-11 10:18 PST by Stefan Frey
Modified: 2007-03-02 15:16 PST (History)
4 users (show)

See Also:


Attachments
Check the innerHTML in the WebInspector! (274 bytes, text/html)
2007-02-12 01:50 PST, Stefan Frey
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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