File tree 2 files changed +4
-3
lines changed
packages/editor/src/components
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { store as commandsStore } from '@wordpress/commands';
22
22
import { useRef , useEffect } from '@wordpress/element' ;
23
23
import { useReducedMotion } from '@wordpress/compose' ;
24
24
import { decodeEntities } from '@wordpress/html-entities' ;
25
+ import { __unstableStripHTML as stripHTML } from '@wordpress/dom' ;
25
26
26
27
/**
27
28
* Internal dependencies
@@ -200,7 +201,7 @@ export default function DocumentBar( props ) {
200
201
< Text size = "body" as = "h1" >
201
202
< span className = "editor-document-bar__post-title" >
202
203
{ title
203
- ? decodeEntities ( title )
204
+ ? stripHTML ( title )
204
205
: __ ( 'No title' ) }
205
206
</ span >
206
207
{ pageTypeBadge && (
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { store as coreStore } from '@wordpress/core-data';
12
12
import { useSelect } from '@wordpress/data' ;
13
13
import { useMemo } from '@wordpress/element' ;
14
14
import { __ , sprintf } from '@wordpress/i18n' ;
15
- import { decodeEntities } from '@wordpress/html-entities ' ;
15
+ import { __unstableStripHTML as stripHTML } from '@wordpress/dom ' ;
16
16
17
17
/**
18
18
* Internal dependencies
@@ -94,7 +94,7 @@ export default function PostCardPanel( {
94
94
labels ?. name
95
95
) ;
96
96
} else if ( postTitle ) {
97
- title = decodeEntities ( postTitle ) ;
97
+ title = stripHTML ( postTitle ) ;
98
98
}
99
99
100
100
return (
You can’t perform that action at this time.
0 commit comments