This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14009 - Consider treating linebreaks in <pre> specially for formatBlock etc.
Summary: Consider treating linebreaks in <pre> specially for formatBlock etc.
Status: NEW
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - HTML Editing APIs (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement
Target Milestone: ---
Deadline: 2015-07-30
Assignee: Aryeh Gregor
QA Contact: HTML Editing APIs spec bugbot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-02 22:03 UTC by Aryeh Gregor
Modified: 2015-07-30 23:47 UTC (History)
2 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-09-02 22:03:03 UTC
Consider this formatBlock testcase:

  ['<p>', '{<pre>&#10;foo&#10;&#10;bar&#10;</pre>}'],

Chrome 15 dev produces

 <p>&#10;foo<br>&#10;bar</p>

while the spec, IE9, and Firefox 8.0a2 produce

  <p>{foo&#10;bar&#10;&#10;}</p>

Opera 11.50 is similar to IE/Firefox.  Should we special-case this the way WebKit does, or not?  WebKit probably better matches user expectations, but it might be annoying to handle.  If we do special-case it, we likely want to just replace all the newlines by <br> right before any time when we might plausibly change the tag name.