0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-01-03 05:11:52 +00:00

[3.1.1] Mimick movie value in data if not set in safe object.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1794 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2008-06-11 23:12:38 +00:00
parent d702077d2e
commit f2794e59c5

View File

@ -44,6 +44,12 @@ class HTMLPurifier_Injector_SafeObject extends HTMLPurifier_Injector
return; return;
} }
$n = $token->attr['name']; $n = $token->attr['name'];
// We need this fix because YouTube doesn't supply a data
// attribute, which we need if a type is specified. This is
// *very* Flash specific.
if (!isset($this->objectStack[$i]->attr['data']) && $token->attr['name'] == 'movie') {
$this->objectStack[$i]->attr['data'] = $token->attr['value'];
}
// Check if the parameter is the correct value but has not // Check if the parameter is the correct value but has not
// already been added // already been added
if ( if (