Skip to content

Site Editor: Automatically generated paragraph in Custom HTML block #49513

Closed

Description

@gyurmey2

Description

When a shortcode is added, a paragraph is generated.

Step-by-step reproduction instructions

  1. Open the Site Editor.
  2. Add Custom HTML block.
  3. Add any shortcode(s), e.g. [custom-shortcode]
  4. Save Changes.
  5. Refresh your browser.
  6. Check if a paragraph has been added.

Screenshots, screen recording, code snippet

g

Environment info

  • WP: 6.2 (with & without Gutenberg plugin)
  • Theme: TT3
  • Source

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. mrfoxtalbot commented on Apr 1, 2023

    @mrfoxtalbot

    I can confirm that I get the same results. Before I reload the editor, it looks like this:
    Screen Shot on 2023-04-01 at 12:30:04

    But after I reload it, a <p> tag is added to the HTML block:

    Screen Shot on 2023-04-01 at 12:32:15

    Interestingly enough, the outputted markup does not change and does not include that <p>:
    Screen Shot on 2023-04-01 at 12:30:36

  2. added
    [Feature] Shortcodes
    [Block] HTML
    on Apr 1, 2023
  3. mrfoxtalbot commented on Apr 1, 2023

    @mrfoxtalbot

    I am hesitant to label this as "bug" because I have the feeling that the <p> is being added for a reason.

  4. Marielle83 commented on Apr 1, 2023

    @Marielle83

    It may be a bug related to #49166 where the Custom HTML block adds p and br tags to anything you add in it.

  5. gyurmey2 commented on Apr 1, 2023

    @gyurmey2
    Author

    @mrfoxtalbot However, each time you have to remove the characters before saving.

  6. jordesign commented on Jul 26, 2023

    @jordesign
    Contributor

    This should be fixed with the solution in #52716 so I'm going to close this for now.

    @gyurmey2 if you're still seeing the issue - please feel free to reopen with further details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] HTML[Feature] Shortcodes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions