WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

HTML Block: Do not auto-insert unwanted paragraph tags. #28473

Closed trev-dev closed 3 years ago

trev-dev commented 3 years ago

Description

Paragraph tags are being added to HTML blocks.

Step-by-step reproduction instructions

  1. Add a new HTML Block
  2. Paste HTML code, or write HTML Code
  3. Save your page and/or preview it
  4. Observe all the paragraph tags you didn't explicitly type.

    Expected behaviour

    In an HTML block I expect to see paragraphs only where I specify them.

    Actual behaviour

    WordPress pollutes the HTML with paragraph tags

    Screenshots or screen recording (optional)

Code snippet (optional)

WordPress information

Device information

skorasaurus commented 3 years ago

Hi,

Thanks for reporting; I'm unable to reproduce this; could you share a code snippet of the block as well as what versions of Gutenberg (the plugin, if you're using) as well as the version of WordPress? (below is a video of what I experience on gutenberg 9.8.1 - https://user-images.githubusercontent.com/955351/105771656-e03a8d00-5f2e-11eb-8d4b-7c0e2dd36c79.mp4

trev-dev commented 3 years ago

I made some bad assumptions when I posted this issue, sorry! The "page" is a custom post type for a pop-up creator in WordPress.

After receiving your reply, I tested my HTML in a normal page type and there were no resulting implicit paragraph tags.

Thanks for looking into it @skorasaurus