From 915344f446bce344ee2f0c77e66a4ad4e0b525d4 Mon Sep 17 00:00:00 2001 From: ramonjd Date: Tue, 6 Dec 2022 07:45:53 +1100 Subject: [PATCH] I think the PR - strip markup from link label data in inspector (#46171) - meant to use `stripHTML` --- packages/block-library/src/navigation-link/edit.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/navigation-link/edit.js b/packages/block-library/src/navigation-link/edit.js index 16f3e4ca11d799..02c96d2e5f61ef 100644 --- a/packages/block-library/src/navigation-link/edit.js +++ b/packages/block-library/src/navigation-link/edit.js @@ -31,13 +31,15 @@ import { } from '@wordpress/block-editor'; import { isURL, prependHTTP } from '@wordpress/url'; import { Fragment, useState, useEffect, useRef } from '@wordpress/element'; -import { placeCaretAtHorizontalEdge } from '@wordpress/dom'; +import { + placeCaretAtHorizontalEdge, + __unstableStripHTML as stripHTML, +} from '@wordpress/dom'; import { link as linkIcon, addSubmenu } from '@wordpress/icons'; import { store as coreStore, useResourcePermissions, } from '@wordpress/core-data'; - import { useMergeRefs } from '@wordpress/compose'; /** @@ -476,7 +478,7 @@ export default function NavigationLinkEdit( { { setAttributes( { label: labelValue } ); } }