From 147122a878b53d1ea5299dbadb6d5aef43e634ad Mon Sep 17 00:00:00 2001 From: Addison-Stavlo Date: Tue, 14 Jan 2020 17:11:42 -0500 Subject: [PATCH 1/2] pass url through escape function --- packages/block-library/src/navigation-link/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/navigation-link/edit.js b/packages/block-library/src/navigation-link/edit.js index 9203239b55af60..c6cd803356fa4d 100644 --- a/packages/block-library/src/navigation-link/edit.js +++ b/packages/block-library/src/navigation-link/edit.js @@ -175,7 +175,7 @@ function NavigationLinkEdit( { opensInNewTab: newOpensInNewTab, } = {} ) => setAttributes( { title: escape( newTitle ), - url: newURL, + url: escape( newURL ), label: label || escape( newTitle ), opensInNewTab: newOpensInNewTab, } ) } From 735bc95774646946e80dbcf60e654a088045e9cf Mon Sep 17 00:00:00 2001 From: Addison-Stavlo Date: Wed, 15 Jan 2020 13:16:45 -0500 Subject: [PATCH 2/2] replace escape with encodeURI --- packages/block-library/src/navigation-link/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/navigation-link/edit.js b/packages/block-library/src/navigation-link/edit.js index 58643b240cbf81..aa98feeace79d3 100644 --- a/packages/block-library/src/navigation-link/edit.js +++ b/packages/block-library/src/navigation-link/edit.js @@ -176,7 +176,7 @@ function NavigationLinkEdit( { opensInNewTab: newOpensInNewTab, } = {} ) => setAttributes( { title: escape( newTitle ), - url: escape( newURL ), + url: encodeURI( newURL ), label: label || escape( newTitle ), opensInNewTab: newOpensInNewTab, } ) }