Merge pull request #6226 from annando/oembed-array

Ignoring OEmbed array values
This commit is contained in:
Hypolite Petovan 2018-12-02 19:16:13 -05:00 committed by GitHub
commit 69a73678eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,8 @@ class OEmbed
if (in_array($key, ['thumbnail_width', 'thumbnail_height', 'width', 'height'])) {
// These values should be numbers, so ensure that they really are numbers.
$value = (int)$value;
} elseif (is_array($value)) {
// Ignoring arrays.
} elseif ($key != 'html') {
// Avoid being able to inject some ugly stuff through these fields.
$value = htmlentities($value);