[wp-trac] [WordPress Trac] #40749: Inline style shortcode for background-image issue #2

WordPress Trac noreply at wordpress.org
Sun May 14 19:41:26 UTC 2017


#40749: Inline style shortcode for background-image issue #2
-----------------------------+------------------------------
 Reporter:  markusfroehlich  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:  4.7.4
 Severity:  normal           |  Resolution:
 Keywords:  close            |     Focuses:
-----------------------------+------------------------------
Changes (by azaozz):

 * keywords:   => close


Comment:

 > But is it possible to filter the regex pattern with a WordPress filter?

 You mean, so plugins can remove it or make it insecure when they want to?
 Don't think this is a good idea :)

 As I replied to your other ticket, #40744, using shortcodes in HTML
 attributes is '''bad idea''' and is officially not supported. I know that
 it kind of works, which is unfortunate. However it is considered a bad
 practice. Look at the example in the ticket above: using a shortcode makes
 the URL invalid.

 I'm actually thinking we should add a filter/scan for similar shortcodes
 usage in the plugin directory and flag plugins that do it. Then perhaps
 show a warning on the plugins page that the plugin doesn't follow "best
 practices".

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40749#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list