Opened 8 years ago

Closed 8 years ago

#14774 closed Bug (invalid)

newline <br/> becomes &nbsp; when invoking getData()

Reported by: Satya Minnekanti Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: IBM Cc: Irina

Description

To reproduce the defect:

  1. Open nightly build & clear all editor content
  1. Add few empty paragraph's.
  1. Open inspector like Firebug, you see content like this in the editor body:
<p><br></p>
<p><br></p>
<p><br></p>
<p><br></p>
  1. Click "Source" button which invokes getData(), it gives:
<p dir="ltr">&nbsp;</p>
<p dir="ltr">&nbsp;</p>
<p dir="ltr">&nbsp;</p>
<p dir="ltr">&nbsp;</p>

You can see the <br> converted to &nbsp;

please review and see whether this is a defect, or any reasons behind for the conversion. it seems to be intended. if it is, please explain the reason for doing this conversion.

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed
Version: 4.5.10 (GitHub - master)

In editable, empty blocks need fillers so that they could have a height. This role is fulfilled by <br> nodes. In data empty blocks are filled with &nbsp; and this is one of basic concepts of HtmlDataProcessora
In short, we use <br> in ediatble and &nbsp; in data. This is by design.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy