WordPress.org

Making WordPress.org

Opened 3 years ago

Closed 2 years ago

#2270 closed defect (worksforme)

Shortcodes being parsed on plugin page

Reported by: pento Owned by: dd32
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

The Mixcloud Embed plugin has an example of the shortcode usage, but that's being parsed by Jetpack's Mixcloud shortcode support. The two plugins have different formats for the shortcode, so Jetpack throws a notice.

*E_NOTICE: /home/wporg/public_html/wp-content/plugins/jetpack/modules/shortcodes/mixcloud.php:30 - Uninitialized string offset: 0*
Uninitialized string offset: 0
Timestamp: Thu, 24 Nov 2016 19:18:41 +0000 (1480015121)
File: /home/wporg/public_html/wp-content/plugins/jetpack/modules/shortcodes/mixcloud.php
Line: 30
Source: GET https://wordpress.org/plugins-wp/mixcloud-embed/

https://plugins.trac.wordpress.org/browser/mixcloud-embed/trunk/readme.txt
https://wordpress.org/plugins-wp/mixcloud-embed/

Change History (5)

#1 @dd32
3 years ago

  • Milestone set to Plugin Directory v3 - M9

I guess we better decide what shortcodes we want to allow, and disable the rest or find a way to escape them during readme parsing.
I feel that we might be better off with a shortcode filter and a whitelist of shortcodes we allow, and hopefully return a display version of any other shortcodes.

We intentionally support [youtube] and [vimeo], but others such as mixcloud and those contained within code blocks shouldn't have been enabled.

See also #1723

#2 @dd32
3 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 4424:

Plugin Directory: Limit the shortcodes in use on the plugin directory to those registered by the directory, and youtube, vimeo and videopress.
Fixes #2270.

#3 @samuelsidler
2 years ago

  • Milestone Plugin Directory v3 - M9 deleted

Milestone Plugin Directory v3 - M9 deleted

#4 @dartiss
2 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I'm aware this has been closed but is there a solution for those using the remaining plugins? My most popular plugin in the directory is YouTube Embed, which uses the YouTube shortcode - the instructions require me to use the shortcode but, right now, it doesn't display.

I believe I can use double brackets (although I've not tried it) to get around this but, as a solution, this works for the directory but not for those displaying the README in other ways (e.g. reading the raw file).

I'm assuming these shortcodes have been left so they can be used on other, non-directory pages. Is there a way to enable them only for these and disable for the plugin listings?

Thanks.

#5 @Ipstenu
2 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

Double Brackets would be the correct solution. And it appears your plugin page is working just fine now and I see you're using them.

Is there a way to enable them only for these and disable for the plugin listings?

I don't believe so since it's Jetpack here... Also we encourage people to use those shortcodes, so you'd be asking us to break other people for you. It's a no-win situation there!

How often are people reading the raw readme these days? I know that used to be fairly common, but now unless you're linking directly to them, I don't think people even look...

We can keep chatting about this, even if the ticket is closed. I'm just trying to clean out what MUST be fixed ASAP and what's just annoying.

Note: See TracTickets for help on using tickets.