WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/14/2018 01:40:50 AM (3 years ago)
Author:
pento
Message:

KSES: Allow url() to be used in inline CSS.

The cover image block uses the url() function in its inline CSS, to show the cover image. KSES didn't allow this, causing the block to not save correctly for Author and Contributor users. As KSES does already check each attribute name against an allowed list, we're able to add an extra check for certain attributes to be able to use the url() function, too.

Merges [43781] from the 5.0 branch to core.

Props peterwilsoncc, azaozz, pento, dd32.
Fixes #45067.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tests/phpunit/tests/shortcode.php

    r43571 r44136  
    562562            ),
    563563            array(
    564                 '<div style="background:url([[gallery]])">',
    565                 '<div style="background:url([[gallery]])">',
     564                '<div style="selector:url([[gallery]])">',
     565                '<div style="selector:url([[gallery]])">',
    566566            ),
    567567            array(
Note: See TracChangeset for help on using the changeset viewer.