From f2794e59c546c5b691219d078323f9e561195952 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Wed, 11 Jun 2008 23:12:38 +0000 Subject: [PATCH] [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 --- library/HTMLPurifier/Injector/SafeObject.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/HTMLPurifier/Injector/SafeObject.php b/library/HTMLPurifier/Injector/SafeObject.php index b88bcbcc..f3794068 100644 --- a/library/HTMLPurifier/Injector/SafeObject.php +++ b/library/HTMLPurifier/Injector/SafeObject.php @@ -44,6 +44,12 @@ class HTMLPurifier_Injector_SafeObject extends HTMLPurifier_Injector return; } $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 // already been added if (