Opened 14 years ago

Last modified 11 years ago

#5233 confirmed Bug

Can not remove blockquote that was written in source mode or as default text

Reported by: Sa'ar Zac Elias Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:


To reproduce

  • Open a new editor and go to Source mode
  • Write this text: <blockquote>Text</blockquote> and place the caret somewhere inside it
  • Click on the blockquote button

The blockquote is not removed.

Change History (5)

comment:1 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Discussion added

Note that the provided HTML code is not valid, and that's why it gives unwanted results.

The blockquote element accepts only block elements inside of it. So, in the editor, we don't switch the <blockquote> to <p> when clicking on the button, but we instead remove the tag, leaving its contents, which in this case would break the document structure.

We usually don't bloat the code with fixes for weird code created outside the editor, but lets leave this one opened for reference and discussion.

comment:2 Changed 14 years ago by Sa'ar Zac Elias

I don't think you should think about the document structure in this case. if an end-user would like to remove the block he should be aware of the consequences. if he is not happy with the result, he can always undo it.
The source code will not always be strict valid, and i think that in some minor cases such as this case the editor should handle even code that is not perfectly valid.

comment:3 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Version: 3.13.0

Despite the invalid HTML <blockquote>Text</blockquote>, currently it is impossible to remove the blockquote which gives the impression to the users that something is broken in editor.

We do not event inform the user with any dialog or console log that his code is the reason of the problem. I doubt that inexperienced user who inserted such code will suddenly come up with an idea "Hey maybe my HTML is invalid."

comment:4 Changed 11 years ago by Piotrek Koszuliński

This issue is still reproducible in 4.0.2 (4.x (v4))

Last edited 11 years ago by Jakub Ś (previous) (diff)

comment:5 Changed 11 years ago by Jakub Ś

Keywords: Discussion removed

NOTE: In HTML5 according to (last example), blockquote accepts also plain text as its content.

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