Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 25... Línea 25...
25
        $css = $this->parseCDATA($css);
25
        $css = $this->parseCDATA($css);
Línea 26... Línea 26...
26
 
26
 
27
        $definition = $config->getCSSDefinition();
27
        $definition = $config->getCSSDefinition();
Línea -... Línea 28...
-
 
28
        $allow_duplicates = $config->get("CSS.AllowDuplicates");
-
 
29
 
-
 
30
        $universal_attrdef = new HTMLPurifier_AttrDef_Enum(
-
 
31
            array(
-
 
32
                'initial',
-
 
33
                'inherit',
-
 
34
                'unset',
Línea 28... Línea 35...
28
        $allow_duplicates = $config->get("CSS.AllowDuplicates");
35
            )
29
 
36
        );
30
 
37
 
31
        // According to the CSS2.1 spec, the places where a
38
        // According to the CSS2.1 spec, the places where a
Línea 94... Línea 101...
94
                }
101
                }
95
            } while (0);
102
            } while (0);
96
            if (!$ok) {
103
            if (!$ok) {
97
                continue;
104
                continue;
98
            }
105
            }
99
            // inefficient call, since the validator will do this again
106
            $result = $universal_attrdef->validate($value, $config, $context);
100
            if (strtolower(trim($value)) !== 'inherit') {
107
            if ($result === false) {
101
                // inherit works for everything (but only on the base property)
-
 
102
                $result = $definition->info[$property]->validate(
108
                $result = $definition->info[$property]->validate(
103
                    $value,
109
                    $value,
104
                    $config,
110
                    $config,
105
                    $context
111
                    $context
106
                );
112
                );
107
            } else {
-
 
108
                $result = 'inherit';
-
 
109
            }
113
            }
110
            if ($result === false) {
114
            if ($result === false) {
111
                continue;
115
                continue;
112
            }
116
            }
113
            if ($allow_duplicates) {
117
            if ($allow_duplicates) {