Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 114... Línea 114...
114
                new HTMLPurifier_AttrDef_Enum(
114
                new HTMLPurifier_AttrDef_Enum(
115
                    [
115
                    [
116
                        'auto',
116
                        'auto',
117
                        'cover',
117
                        'cover',
118
                        'contain',
118
                        'contain',
119
                        'initial',
-
 
120
                        'inherit',
-
 
121
                    ]
119
                    ]
122
                ),
120
                ),
123
                new HTMLPurifier_AttrDef_CSS_Percentage(),
121
                new HTMLPurifier_AttrDef_CSS_Percentage(),
124
                new HTMLPurifier_AttrDef_CSS_Length()
122
                new HTMLPurifier_AttrDef_CSS_Length()
125
            ]
123
            ]
Línea 234... Línea 232...
234
 
232
 
235
        $trusted_wh = new HTMLPurifier_AttrDef_CSS_Composite(
233
        $trusted_wh = new HTMLPurifier_AttrDef_CSS_Composite(
236
            [
234
            [
237
                new HTMLPurifier_AttrDef_CSS_Length('0'),
235
                new HTMLPurifier_AttrDef_CSS_Length('0'),
238
                new HTMLPurifier_AttrDef_CSS_Percentage(true),
236
                new HTMLPurifier_AttrDef_CSS_Percentage(true),
239
                new HTMLPurifier_AttrDef_Enum(['auto', 'initial', 'inherit'])
237
                new HTMLPurifier_AttrDef_Enum(['auto'])
240
            ]
238
            ]
241
        );
239
        );
242
        $trusted_min_wh = new HTMLPurifier_AttrDef_CSS_Composite(
240
        $trusted_min_wh = new HTMLPurifier_AttrDef_CSS_Composite(
243
            [
241
            [
244
                new HTMLPurifier_AttrDef_CSS_Length('0'),
242
                new HTMLPurifier_AttrDef_CSS_Length('0'),
245
                new HTMLPurifier_AttrDef_CSS_Percentage(true),
-
 
246
                new HTMLPurifier_AttrDef_Enum(['initial', 'inherit'])
243
                new HTMLPurifier_AttrDef_CSS_Percentage(true),
247
            ]
244
            ]
248
        );
245
        );
249
        $trusted_max_wh = new HTMLPurifier_AttrDef_CSS_Composite(
246
        $trusted_max_wh = new HTMLPurifier_AttrDef_CSS_Composite(
250
            [
247
            [
251
                new HTMLPurifier_AttrDef_CSS_Length('0'),
248
                new HTMLPurifier_AttrDef_CSS_Length('0'),
252
                new HTMLPurifier_AttrDef_CSS_Percentage(true),
249
                new HTMLPurifier_AttrDef_CSS_Percentage(true),
253
                new HTMLPurifier_AttrDef_Enum(['none', 'initial', 'inherit'])
250
                new HTMLPurifier_AttrDef_Enum(['none'])
254
            ]
251
            ]
255
        );
252
        );
Línea 256... Línea 253...
256
        $max = $config->get('CSS.MaxImgLength');
253
        $max = $config->get('CSS.MaxImgLength');
Línea 276... Línea 273...
276
            $max === null ?
273
            $max === null ?
277
                $trusted_min_wh :
274
                $trusted_min_wh :
278
                new HTMLPurifier_AttrDef_Switch(
275
                new HTMLPurifier_AttrDef_Switch(
279
                    'img',
276
                    'img',
280
                    // For img tags:
277
                    // For img tags:
281
                    new HTMLPurifier_AttrDef_CSS_Composite(
-
 
282
                        [
-
 
283
                            new HTMLPurifier_AttrDef_CSS_Length('0', $max),
278
                    new HTMLPurifier_AttrDef_CSS_Length('0', $max),
284
                            new HTMLPurifier_AttrDef_Enum(['initial', 'inherit'])
-
 
285
                        ]
-
 
286
                    ),
-
 
287
                    // For everyone else:
279
                    // For everyone else:
288
                    $trusted_min_wh
280
                    $trusted_min_wh
289
                );
281
                );
290
        $this->info['max-width'] =
282
        $this->info['max-width'] =
291
        $this->info['max-height'] =
283
        $this->info['max-height'] =
Línea 295... Línea 287...
295
                    'img',
287
                    'img',
296
                    // For img tags:
288
                    // For img tags:
297
                    new HTMLPurifier_AttrDef_CSS_Composite(
289
                    new HTMLPurifier_AttrDef_CSS_Composite(
298
                        [
290
                        [
299
                            new HTMLPurifier_AttrDef_CSS_Length('0', $max),
291
                            new HTMLPurifier_AttrDef_CSS_Length('0', $max),
300
                            new HTMLPurifier_AttrDef_Enum(['none', 'initial', 'inherit'])
292
                            new HTMLPurifier_AttrDef_Enum(['none'])
301
                        ]
293
                        ]
302
                    ),
294
                    ),
303
                    // For everyone else:
295
                    // For everyone else:
304
                    $trusted_max_wh
296
                    $trusted_max_wh
305
                );
297
                );
Línea -... Línea 298...
-
 
298
 
-
 
299
        $this->info['aspect-ratio'] = new HTMLPurifier_AttrDef_CSS_Multiple(
-
 
300
            new HTMLPurifier_AttrDef_CSS_Composite([
-
 
301
                new HTMLPurifier_AttrDef_CSS_Ratio(),
-
 
302
                new HTMLPurifier_AttrDef_Enum(['auto']),
-
 
303
            ])
-
 
304
        );
306
 
305
 
307
        // text-decoration and related shorthands
306
        // text-decoration and related shorthands
Línea 308... Línea 307...
308
        $this->info['text-decoration'] = new HTMLPurifier_AttrDef_CSS_TextDecoration();
307
        $this->info['text-decoration'] = new HTMLPurifier_AttrDef_CSS_TextDecoration();
309
 
308
 
310
        $this->info['text-decoration-line'] = new HTMLPurifier_AttrDef_Enum(
309
        $this->info['text-decoration-line'] = new HTMLPurifier_AttrDef_Enum(
Línea 311... Línea 310...
311
            ['none', 'underline', 'overline', 'line-through', 'initial', 'inherit']
310
            ['none', 'underline', 'overline', 'line-through']
312
        );
311
        );
313
 
312
 
Línea 314... Línea 313...
314
        $this->info['text-decoration-style'] = new HTMLPurifier_AttrDef_Enum(
313
        $this->info['text-decoration-style'] = new HTMLPurifier_AttrDef_Enum(
Línea 315... Línea 314...
315
            ['solid', 'double', 'dotted', 'dashed', 'wavy', 'initial', 'inherit']
314
            ['solid', 'double', 'dotted', 'dashed', 'wavy']
316
        );
315
        );
317
 
316
 
318
        $this->info['text-decoration-color'] = new HTMLPurifier_AttrDef_CSS_Color();
317
        $this->info['text-decoration-color'] = new HTMLPurifier_AttrDef_CSS_Color();
319
 
318
 
Línea 320... Línea 319...
320
        $this->info['text-decoration-thickness'] = new HTMLPurifier_AttrDef_CSS_Composite([
319
        $this->info['text-decoration-thickness'] = new HTMLPurifier_AttrDef_CSS_Composite([
Línea 321... Línea 320...
321
            new HTMLPurifier_AttrDef_CSS_Length(),
320
            new HTMLPurifier_AttrDef_CSS_Length(),