wordpress-mobile / wordpress-mobile/AztecEditor-iOS

hr element cannot be contained in p element

Open
#1,121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Bug
Dominant language
Swift
Stars
669
Forks
153
Avg merge
11h 27m
Merged PRs (30d)
4

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the saved-HTML cycle in Aztec 1.4.1 on an iOS editor, focusing on how HR and P elements are handled. Done means inserting and saving an HR does not add an empty P before it or wrap it in a P on the next edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.