Skip to content

Editor crash on column block with empty width attribute #29017

@guarani

Description

@guarani

The native editor crashes when a column block contains an empty width attribute.

Description

Step-by-step reproduction instructions

  1. Open the native block editor (React Native editor)
  2. Replace the editor contents with the following HTML and observe that the app crashes
<!-- wp:columns -->
	<div class="wp-block-columns">
		<!-- wp:column -->
			<div class="wp-block-column"></div>
		<!-- /wp:column -->

		<!-- wp:column {"width":""} -->
			<div class="wp-block-column"></div>
		<!-- /wp:column -->
	</div>
<!-- /wp:columns -->

Expected behaviour

The native editor should ignore the empty width attribute just as the web editor does

Actual behaviour

The native editor crashes when it encounters an empty width attribute in a column block.

WordPress information

Current master branch: 6ef9e82

Device information

iOS or Android

Metadata

Metadata

Assignees

Labels

Mobile App - i.e. Android or iOSNative mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)[Block] ColumnsAffects the Columns Block[Priority] HighUsed to indicate top priority items that need quick attention[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions