WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #28951, comment 10


Ignore:
Timestamp:
08/04/2014 09:58:25 PM (6 years ago)
Author:
kadamwhite
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28951, comment 10

    v1 v2  
    11This patch looks good, but I've altered the name of the new variable to be `align` (for readability); made the regex for the alignment class case-insensitive; and standardized the whitespace around + operators within the lines touched by the path.
    22
    3 The reasoning for making the regex case-insensitive is that putting in mis-cased values into the 'align' attribute was causing an issue where the invalid attribute value and "wp-class" would get inserted into the user's custom class. Invalid alignment values (e.g. `align="sideways"`) will still trigger this behavior, and that may be inevitable, but making the regex case-insensitive was a quick way to mitigate it without altering the functionality of the patch.
     3The reasoning for making the regex case-insensitive is that putting in mis-cased values into the 'align' attribute was causing an issue where the invalid attribute value and "wp-class" would get inserted into the user's shortcode class attribute value. Invalid alignment values (e.g. `align="sideways"`) will still trigger this behavior, and that may be inevitable, but making the regex case-insensitive was a quick way to mitigate it without altering the functionality of the patch.