[wp-trac] [WordPress Trac] #39552: SVG upload support broken in 4.7.1
WordPress Trac
noreply at wordpress.org
Thu Jan 19 16:58:57 UTC 2017
#39552: SVG upload support broken in 4.7.1
----------------------------------------+----------------------
Reporter: freakpants | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.7.2
Component: Upload | Version: trunk
Severity: normal | Resolution: invalid
Keywords: needs-unit-tests has-patch | Focuses:
----------------------------------------+----------------------
Changes (by LewisCowles):
* status: new => closed
* resolution: => invalid
Comment:
Although mildly troubling the simple check; there is actually no break
from WP core as it doesn't support SVG.
I patched my plugin to work around the code by faking
`application/svg+xml` mime type and then overriding later on.
https://github.com/Lewiscowles1986/WordPressSVGPlugin/
Much as it was a little PITA to change code (it always is), SVG upload is
separate from core. AFAIK the objection that stands is that it's a
security risk, so I'm not sure adding things into core to keep a small
number of plugins functional rather than update those plugins should be
such a concern.
It would be lovely to have all upload types implemented as plugins to
core, so that passing width and height information, metadata, parsing etc
becomes easier to support for core and plugin authors augmenting file-
types more stringent checks etc.
What would also be lovely although I didn't see it here is if the media
templates were extensible as currently to work around display issues we
are doing some... interesting things with output buffering.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39552#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list