WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#31949 closed enhancement (fixed)

Augment list of whitelisted CSS properties in kses.php

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

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 5 years ago.
31949.2.diff (994 bytes) - added by MikeHansenMe 4 years ago.
add max-width and max-height

Download all attachments as: .zip

Change History (9)

@MikeHansenMe
5 years ago

#1 @MikeHansenMe
5 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
5 years ago

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

#3 @MikeHansenMe
4 years ago

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

#4 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 4.4

#5 @SergeyBiryukov
4 years ago

What about max-height and max-width?

@MikeHansenMe
4 years ago

add max-width and max-height

#6 follow-up: @wonderboymusic
4 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
4 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.