MediaWiki REL1_30
styleTest.css.php
Go to the documentation of this file.
1<?php
25header( 'Content-Type: text/css; charset=utf-8' );
26
35function cssfilter( $val ) {
36 return preg_replace( '/[^A-Za-z0-9\.\- #]/', '', $val );
37}
38
39// Do basic sanitization
40$params = array_map( 'cssfilter', $_GET );
41
42// Defaults
43$selector = isset( $params['selector'] ) ? $params['selector'] : '.mw-test-example';
44$property = isset( $params['prop'] ) ? $params['prop'] : 'float';
45$value = isset( $params['val'] ) ? $params['val'] : 'right';
46$wait = isset( $params['wait'] ) ? (int)$params['wait'] : 0; // seconds
47
48sleep( $wait );
49
56$selector {
57 $property: $value;
58}
59";
60
61echo trim( $css ) . "\n";
$selector
cssfilter( $val)
Allows characters in ranges [a-z], [A-Z] and [0-9], in addition to a dot ("."), dash ("-"),...
$property
$params