Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation: Fix issue creating front-end markup #18607

Merged
merged 3 commits into from Nov 20, 2019

Conversation

@retrofox
Copy link
Contributor

retrofox commented Nov 19, 2019

Description

It fixes a bug when the link has special chars escaping them applying the esc_attr() function.

Fixes #18604

How has this been tested?

Add a link from a post or page where its menu has a special char, for instance <, >, etc

Before
Confirm that it breaks the markup in the front-end:

Screen Shot 2019-11-19 at 9 33 04 AM

After
The markup should be ok.

Screen Shot 2019-11-19 at 9 34 35 AM

Screenshots

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
@retrofox retrofox requested a review from getdave Nov 19, 2019
@retrofox retrofox added this to 👀 PRs to review in Navigation block via automation Nov 19, 2019
@retrofox retrofox changed the title navigation: esc attrs making markup Navigation: Fix issue creating front-end markup Nov 19, 2019
Copy link
Contributor

getdave left a comment

Nice work @retrofox 👍

Copy link
Contributor

draganescu left a comment

All attributes should go through esc_attr indeed :)

@retrofox retrofox force-pushed the fix/navigation-markup-broken branch from fea84ee to 7c8b33f Nov 19, 2019
packages/block-library/src/navigation/index.php Outdated Show resolved Hide resolved
packages/block-library/src/navigation/index.php Outdated Show resolved Hide resolved
@retrofox retrofox requested a review from obenland Nov 19, 2019
retrofox added 3 commits Nov 19, 2019
It fixes a big when the link has spececial chars escaping them applying the esc_attr() function
@retrofox retrofox force-pushed the fix/navigation-markup-broken branch from 3273d9e to 760f0a5 Nov 20, 2019
@retrofox retrofox merged commit 35d5f69 into master Nov 20, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
Navigation block automation moved this from 👀 PRs to review to ✅ Done Nov 20, 2019
@retrofox retrofox deleted the fix/navigation-markup-broken branch Nov 20, 2019
@youknowriad youknowriad added this to the Gutenberg 7.0 milestone Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.