[wp-trac] [WordPress Trac] #20077: shortcode_parse_atts should not force arguments to be lowercase

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 19 22:09:20 UTC 2012


#20077: shortcode_parse_atts should not force arguments to be lowercase
----------------------------+------------------------------
 Reporter:  fireproofsocks  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  close           |
----------------------------+------------------------------
Changes (by azaozz):

 * keywords:   => close


Comment:

 Replying to [ticket:20077 fireproofsocks]:
 > ... PHP variables ARE case-sensitive, so this arbitrary restriction of
 forcing lower-case parameters seems like the incorrect approach.

 Right, however shortcodes do resemble HTML tags and are used inside the
 HTML. All tag properties/attributes in WordPress are lower case.

 This is rather a coding standards question. Been thinking we should define
 a "WP variable" standard and use and enforce it whenever possible. Things
 like CPT names, CSS class names (when handled by an API), and any other
 variable string that is passed to an API should conform to some basic
 rules. That would make all of them much easier to escape, clean, sanitize,
 etc.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20077#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list