Skip to content

Add support for div, figure, figcaption in content editor

Himanshu Kapoor requested to merge 338380-html-tags into master

What does this MR do?

As per #338380 (closed), this MR adds support for rendering div, figure and figcaption in content editor.

Related MRs:

Screenshots or Screencasts (strongly suggested)

image

How to setup and validate locally (strongly suggested)

  1. Create a new wiki page, or edit an existing one

  2. Type in the following HTML in the markdown editor:

    <div>plain text</div>
    <div>
    
    just a plain ol' div, not much to _expect_!
    
    </div>
    <figure>
    
    ![Elephant at sunset](elephant-sunset.jpg)
    
    <figcaption>An elephant at sunset</figcaption>
    </figure>
    <figure>
    
    ![A crocodile wearing crocs](croc-crocs.jpg)
    
    <figcaption>
    
    A crocodile wearing _crocs_!
    
    </figcaption>
    </figure>
  3. Switch to new editor by clicking "use new editor".

  4. The content renders successfully.

  5. Save with or without making any changes.

  6. Edit the page again.

  7. Note that the markdown / HTML for the tags is correct.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #338380 (closed)

Edited by Himanshu Kapoor

Merge request reports