Ignoring OEmbed array values
This commit is contained in:
parent
02a72ef04f
commit
58b614bea1
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,8 @@ class OEmbed
|
||||||
if (in_array($key, ['thumbnail_width', 'thumbnail_height', 'width', 'height'])) {
|
if (in_array($key, ['thumbnail_width', 'thumbnail_height', 'width', 'height'])) {
|
||||||
// These values should be numbers, so ensure that they really are numbers.
|
// These values should be numbers, so ensure that they really are numbers.
|
||||||
$value = (int)$value;
|
$value = (int)$value;
|
||||||
|
} elseif (is_array($value)) {
|
||||||
|
// Ignoring arrays.
|
||||||
} elseif ($key != 'html') {
|
} elseif ($key != 'html') {
|
||||||
// Avoid being able to inject some ugly stuff through these fields.
|
// Avoid being able to inject some ugly stuff through these fields.
|
||||||
$value = htmlentities($value);
|
$value = htmlentities($value);
|
||||||
|
|
Loading…
Reference in a new issue