Bug 62636 - WebKit HTML editing generates invalid HTML
Summary: WebKit HTML editing generates invalid HTML
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-14 08:07 PDT by equinux AG
Modified: 2012-05-20 00:03 PDT (History)
2 users (show)

See Also:


Attachments
Files mentioned in bug description. (1.54 KB, application/zip)
2011-06-14 08:08 PDT, equinux AG
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description equinux AG 2011-06-14 08:07:52 PDT
Summary:
When editing text in an editable text element (contenteditable="true"), WebKit may generate HTML which is not valid (according to validator.w3.org) because block-level elements (DIVs) appear inside inline elements (FONT, B, SPAN).


Steps to Reproduce:
1. Open the file 1.html in a WebView.
2. Open the file 2.rtf in TextEdit.
3. Copy the entire contents of 2.rtf.
4. Select the contents of the text element in the WebView.
5. Paste the (styled) text from the clipboard.
6. Dump the resulting HTML.


Expected Results:
Resulting HTML should not contain block-level elements inside inline elements.


Actual Results:
HTML output in 3.html.


Regression:

Notes:
Comment 1 equinux AG 2011-06-14 08:08:26 PDT
Created attachment 97119 [details]
Files mentioned in bug description.
Comment 2 Ryosuke Niwa 2012-05-20 00:03:52 PDT
We generate: <div contenteditable="true"><p class="p1"><b>xyz</b></p></div> now.