Skip to content

Shortcode HTML is split into two blocks when converting from classic to blocks #8937

@justinsc

Description

@justinsc

Describe the bug
When converting a classic post that contained a short-code generated by the NextGen Gallery plugin, two blocks are created: a short-code block containing part of the short code, and a text block containing the remaining portion of the short-code.

To Reproduce
Steps to reproduce the behavior:

  1. Create a classic post with the following short code contained in HTML:
    <p>[ngg_images source="galleries" container_ids="2" display_type="photocrati-nextgen_basic_thumbnails" override_thumbnail_settings="0" thumbnail_width="240" thumbnail_height="160" thumbnail_crop="1" images_per_page="20" number_of_columns="0" ajax_pagination="1" show_all_in_lightbox="0" use_imagebrowser_effect="0" show_slideshow_link="1" slideshow_link_text="[Show slideshow]" order_by="sortorder" order_direction="ASC" returns="included" maximum_entity_count="500"]</p>
  2. Click on "Convert to Blocks"
  3. Note that while a short code block was created, a text block was also created containing:
    " order_by="sortorder" order_direction="ASC" returns="included" maximum_entity_count="500"]

Expected behavior
A single short-code block should be created.

Screenshots

HTML prior to converting to blocks:
screen shot 2018-08-13 at 10 32 51 am


Visual blocks after conversion:
screen shot 2018-08-13 at 10 33 28 am


Desktop:

  • OS: Mac OSX 10.13.6
  • Browser: Safari
  • Version: 11.1.2

Additional context

  • Please add the version of Gutenberg you are using in the description.
  • To report a security issue, please visit the WordPress HackerOne program: https://hackerone.com/wordpress.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions