Skip to content

Commit

Permalink
Allow HTML to be pasted into title
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Sep 29, 2023
1 parent aac6e44 commit e6e3080
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/editor/src/components/post-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
insert,
} from '@wordpress/rich-text';
import { useMergeRefs } from '@wordpress/compose';
import { __unstableStripHTML as stripHTML } from '@wordpress/dom';

/**
* Internal dependencies
Expand Down Expand Up @@ -170,7 +169,7 @@ function PostTitle( { rawText }, forwardedRef ) {
( firstBlock.name === 'core/heading' ||
firstBlock.name === 'core/paragraph' )
) {
onUpdate( stripHTML( firstBlock.attributes.content ) );
onUpdate( firstBlock.attributes.content );
onInsertBlockAfter( content.slice( 1 ) );
} else {
onInsertBlockAfter( content );
Expand Down

0 comments on commit e6e3080

Please sign in to comment.