AztecEditor-iOS icon indicating copy to clipboard operation
AztecEditor-iOS copied to clipboard

hr element cannot be contained in p element

Open azone opened this issue 7 years ago • 0 comments

Expected behavior

hr element is self-contained element, should not be contained in p element.

Actual behavior

hr element is contained in p element, this may cause some issues:

  1. The editor automatically adds an empty P element before the HR element each time if hr element is contained in p element. img_3c59e790fcce-1

  2. If the hr element not contained in p element, the editor will add p element surround hr element automatically.

Steps to reproduce the behavior

  1. Open the editor with the content that saved before
  2. Insert hr element
  3. save the html content.
  4. repeat step 1-3
Tested on iPhone 7, iOS 12.1.2, Aztec 1.4.1

References:

  • https://www.w3.org/TR/html51/grouping-content.html#the-hr-element
  • https://www.w3.org/TR/html51/grouping-content.html#the-p-element
  • https://www.w3.org/TR/html51/dom.html#phrasing-content

azone avatar Dec 26 '18 08:12 azone