AztecEditor-iOS
AztecEditor-iOS copied to clipboard
hr element cannot be contained in p element
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:
-
The editor automatically adds an empty P element before the HR element each time if hr element is contained in p element.

-
If the hr element not contained in p element, the editor will add p element surround hr element automatically.
Steps to reproduce the behavior
- Open the editor with the content that saved before
- Insert hr element
- save the html content.
- 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