@@ 448-461 (lines=14) @@ | ||
445 | $support = "(for information on implementing this, see the " . |
|
446 | "support forums) "; |
|
447 | $allowed_properties = $config->get('CSS.AllowedProperties'); |
|
448 | if ($allowed_properties !== null) { |
|
449 | foreach ($this->info as $name => $d) { |
|
450 | if (!isset($allowed_properties[$name])) { |
|
451 | unset($this->info[$name]); |
|
452 | } |
|
453 | unset($allowed_properties[$name]); |
|
454 | } |
|
455 | // emit errors |
|
456 | foreach ($allowed_properties as $name => $d) { |
|
457 | // :TODO: Is this htmlspecialchars() call really necessary? |
|
458 | $name = htmlspecialchars($name); |
|
459 | trigger_error("Style attribute '$name' is not supported $support", E_USER_WARNING); |
|
460 | } |
|
461 | } |
|
462 | ||
463 | $forbidden_properties = $config->get('CSS.ForbiddenProperties'); |
|
464 | if ($forbidden_properties !== null) { |
@@ 301-313 (lines=13) @@ | ||
298 | } |
|
299 | } |
|
300 | ||
301 | if (is_array($allowed_elements)) { |
|
302 | foreach ($this->info as $name => $d) { |
|
303 | if (!isset($allowed_elements[$name])) { |
|
304 | unset($this->info[$name]); |
|
305 | } |
|
306 | unset($allowed_elements[$name]); |
|
307 | } |
|
308 | // emit errors |
|
309 | foreach ($allowed_elements as $element => $d) { |
|
310 | $element = htmlspecialchars($element); // PHP doesn't escape errors, be careful! |
|
311 | trigger_error("Element '$element' is not supported $support", E_USER_WARNING); |
|
312 | } |
|
313 | } |
|
314 | ||
315 | // setup allowed attributes --------------------------------------- |
|
316 |