9 public $name =
'SafeObject';
10 public $needed = array(
'object',
'param');
17 'allowScriptAccess' =>
'never',
18 'allowNetworking' =>
'internal',
25 'allowFullScreen' =>
true,
29 parent::prepare(
$config, $context);
33 if (
$token->name ==
'object') {
34 $this->objectStack[] =
$token;
35 $this->paramStack[] = array();
37 foreach ($this->addParam as
$name => $value) {
41 } elseif (
$token->name ==
'param') {
42 $nest = count($this->currentNesting) - 1;
43 if ($nest >= 0 && $this->currentNesting[$nest]->name ===
'object') {
44 $i = count($this->objectStack) - 1;
45 if (!isset(
$token->attr[
'name'])) {
53 if (!isset($this->objectStack[
$i]->attr[
'data']) &&
54 (
$token->attr[
'name'] ==
'movie' ||
$token->attr[
'name'] ==
'src')) {
55 $this->objectStack[
$i]->attr[
'data'] =
$token->attr[
'value'];
60 !isset($this->paramStack[
$i][$n]) &&
61 isset($this->addParam[$n]) &&
62 $token->attr[
'name'] === $this->addParam[$n]
65 $this->paramStack[
$i][$n] =
true;
66 } elseif (isset($this->allowedParam[$n])) {
83 if (
$token->name ==
'object') {
84 array_pop($this->objectStack);
85 array_pop($this->paramStack);