Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#31949 closed enhancement (fixed)

Augment list of whitelisted CSS properties in kses.php

Reported by: lukeschlather's profile lukeschlather Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: Formatting Keywords: has-patch
Focuses: Cc:

Description

We have a user who wants to use min-width and min-height in their posts. We can add the filter, but it seems like min-width and min-height are harmless and should be added to the standard whitelist:

https://github.com/WordPress/WordPress/blob/master/wp-includes/kses.php#L1480

Attachments (2)

31949.diff (967 bytes) - added by MikeHansenMe 8 years ago.
31949.2.diff (994 bytes) - added by MikeHansenMe 8 years ago.
add max-width and max-height

Download all attachments as: .zip

Change History (9)

@MikeHansenMe
8 years ago

#1 @MikeHansenMe
8 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
8 years ago

  • Component changed from General to Formatting
  • Type changed from feature request to enhancement

#3 @MikeHansenMe
8 years ago

31949.diff still applies. Can we get this in 4.4?

#4 @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to 4.4

#5 @SergeyBiryukov
8 years ago

What about max-height and max-width?

@MikeHansenMe
8 years ago

add max-width and max-height

#6 follow-up: @wonderboymusic
8 years ago

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

In 33739:

Allow these CSS properties in KSES: min-height', 'max-height', 'min-width', 'max-width'

Props MikeHansenMe.
Fixes #31949.

#7 in reply to: ↑ 6 @jmichaelward
8 years ago

Replying to wonderboymusic:

In 33739:

Allow these CSS properties in KSES: min-height', 'max-height', 'min-width', 'max-width'

Props MikeHansenMe.
Fixes #31949.

Just noticed this one come over Slack - glancing at the commit, there's an extra space after 'max-height' (before the comma), and no space before it on line 1697. I assume the code works as-is, but can we update once more to ensure we're meeting WP code quality standards?

Note: See TracTickets for help on using tickets.