[wp-trac] [WordPress Trac] #54261: KSES: Allow PDFs to be embeded as objects
WordPress Trac
noreply at wordpress.org
Mon Nov 1 02:12:24 UTC 2021
#54261: KSES: Allow PDFs to be embeded as objects
-------------------------------------------------+-------------------------
Reporter: pento | Owner: pento
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.9
Component: Formatting | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch 2nd-opinion needs-testing | Focuses:
has-unit-tests needs-dev-note |
-------------------------------------------------+-------------------------
Changes (by pento):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"51963" 51963]:
{{{
#!CommitTicketReference repository="" revision="51963"
KSES: Add options for restricting tags based upon their attributes.
This change adds two now attribute-related config options to KSES:
- An array of allowed values can be defined for attributes. If the
attribute value doesn't fall into the list, the attribute will be removed
from the tag.
- Attributes can be marked as required. If a required attribute is not
present, KSES will remove all attributes from the tag. As KSES doesn't
match opening and closing tags, it's not possible to safely remove the tag
itself, the safest fallback is to strip all attributes from the tag,
instead.
Included with this change is an implementation of these options, allowing
the `<object>` tag to be stored in posts, but only when it has a `type`
attribute set to `application/pdf`.
Props pento, swissspidy, peterwilsoncc, dd32, jorbin.
Fixes #54261.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54261#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list