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 Block: Percentage Character (%) in Links Are Improperly Encoded #69839

Closed
druesome opened this issue Nov 8, 2022 · 5 comments
Closed
Labels
[Platform] Atomic [Platform] Simple [Pri] Low Address when resources are available. Triaged To be used when issues have been triaged. [Type] Bug

Comments

@druesome
Copy link
Contributor

druesome commented Nov 8, 2022

Quick summary

User is trying to add this menu link to the navigation block:

https://api.payaconnect.com/hostedpaymentpage?id=11eacdb9c9fc0d2c989d2057&data=U2FsdGVkX18xMWVhY2RiOa8xisZ0ulzB%2FzlaRnFN0dWAM1rLyZL%2BQpUc9oo2fp616ICqcykrs%2BjPzDfEPLd%2FZA%3D%3D

However, after adding it, something is converting the percentage character % to %25, causing the link to go somewhere else and fail:

https://api.payaconnect.com/hostedpaymentpage?id=11eacdb9c9fc0d2c989d2057&data=U2FsdGVkX18xMWVhY2RiOa8xisZ0ulzB%252FzlaRnFN0dWAM1rLyZL%252BQpUc9oo2fp616ICqcykrs%252BjPzDfEPLd%252FZA%253D%253D

Steps to reproduce

  1. Assign an FSE theme to your site
  2. Go to Site Editor and edit the Header template
  3. Add a Navigation if there isn't one yet
  4. Create a menu item and link it to https://api.payaconnect.com/hostedpaymentpage?id=11eacdb9c9fc0d2c989d2057&data=U2FsdGVkX18xMWVhY2RiOa8xisZ0ulzB%2FzlaRnFN0dWAM1rLyZL%2BQpUc9oo2fp616ICqcykrs%2BjPzDfEPLd%2FZA%3D%3D

What you expected to happen

For the link to remain the same and load the page correctly.

What actually happened

The percentage characters (%) are encoded, causing the link to load incorrectly. This does not occur in regular links within paragraph or list blocks.

Context

No response

Platform (Simple, Atomic, or both?)

Simple, Atomic

Theme-specific issue?

No response

Browser, operating system and other notes

No response

Reproducibility

Consistent

Severity

One

Available workarounds?

Yes, easy to implement

Workaround details

Using a URL shortening service (ie bit.ly) to shorten the link and adding this link to the menu works as a workaround.

@cuemarie
Copy link

📌 SCRUBBING : RESULT

  • Tested on Simple: Could Not Replicate
  • Tested on AT: Could Not Replicate
  • Tested on Self-hosted: Could Not Replicate

📌 FINDINGS/SCREENSHOTS/VIDEO

  • Could not replicate in any tests. Across AT, Simple, and Self-Hosted, the pasted link in the Nav block menu, the % characters were not converted to %25.

Examples
Markup on 2022-11-15 at 19:29:29

Markup on 2022-11-15 at 19:30:37

Markup on 2022-11-15 at 19:31:50

📌 ACTIONS

  • Closed as could not replicate (please reopen the issue reoccurs)

@cuemarie cuemarie added Triaged To be used when issues have been triaged. [Closed] Not Reproducible Issue cannot be reproduced. labels Nov 16, 2022
@druesome
Copy link
Contributor Author

druesome commented Nov 29, 2022

Hi @cuemarie! Can you please check your test site again:

https://mqthree.wpcomstaging.com/

When you inspect the link in the Navigation block, the percentage characters inside the anchor tag (not the link text) are in fact being converted to %25.

image

When you click on the link, you will see that it isn't working and displays this error:

Error
Data submitted is malformed

If formatted correctly, the original link will load a form:

https://api.payaconnect.com/hostedpaymentpage?id=11eacdb9c9fc0d2c989d2057&data=U2FsdGVkX18xMWVhY2RiOa8xisZ0ulzB%2FzlaRnFN0dWAM1rLyZL%2BQpUc9oo2fp616ICqcykrs%2BjPzDfEPLd%2FZA%3D%3D

In case of questions, feel free to DM me in Slack.

Thanks!

@druesome druesome reopened this Nov 29, 2022
@kavyagokul
Copy link

📌 SCRUBBING : RESULT

  • Tested on P2 - Could Not Replicate
  • Tested on Simple - Replicated
  • Tested on AT - Replicated
  • Tested on Self-hosted - Replicated
  • Replicable on Core - Yes

📌 ACTIONS

@kavyagokul kavyagokul removed the [Closed] Not Reproducible Issue cannot be reproduced. label Nov 29, 2022
@danielbachhuber
Copy link
Contributor

FYI - Build will pick this one up. Closing in favor of WordPress/gutenberg#46159

@danielbachhuber
Copy link
Contributor

This should be fixed when Gutenberg 15.0 is released WordPress/gutenberg#46435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Platform] Atomic [Platform] Simple [Pri] Low Address when resources are available. Triaged To be used when issues have been triaged. [Type] Bug
Projects
None yet
Development

No branches or pull requests

4 participants