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

Input validation for shortcode block #10790

Closed
iamgabrielma opened this issue Oct 19, 2018 · 2 comments
Closed

Input validation for shortcode block #10790

iamgabrielma opened this issue Oct 19, 2018 · 2 comments

Comments

@iamgabrielma
Copy link
Contributor

Describe the bug

If we add an URL into the shortcode block, it accepts it and the link is displayed in the site front-end.

To Reproduce
Steps to reproduce the behavior:

  1. Create a shortcode block
  2. Add an URL in the text field
  3. Publish

Expected behavior
To get some error message when something that is not a shortcode is added.

Screenshots

Back-end:
screen shot 2018-10-18 at 14 33 0011

Front-end:
screen shot 2018-10-18 at 14 33 00

Desktop (please complete the following information):

  • OS: El Capitan 10.11.6
  • Browser Firefox 62.0.3
  • Gutenberg 4.0

Additional context

Reported originally in the comments on #7357 when I was testing something else

@Soean Soean added the [Feature] Shortcodes Related to shortcode functionality label Oct 19, 2018
@swissspidy
Copy link
Member

As mentioned in #7357 (comment), do_shortcode() won't do anything to a non-shortcode string like that, but the URL is picked up by the WordPress embed handler and turns it into a proper embed.

@t-hamano
Copy link
Contributor

From my understanding, I don't think this is an issue specific to the Shortcode block or Gutenberg. For example, in the Classic Editor, you can simply enter a URL that is allowed as an oEmbed provider and it will be converted to embedded content in the front end.

shortcode

I think this is expected behavior in WP core, so I'll close this issue, but if there's anything I've missed, please comment.

@t-hamano t-hamano closed this as not planned Won't fix, can't repro, duplicate, stale Dec 17, 2023
@t-hamano t-hamano removed [Type] Enhancement A suggestion for improvement. [Feature] Shortcodes Related to shortcode functionality labels Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants