MediaWiki
REL1_31
styleTest.css.php
Go to the documentation of this file.
1
<?php
25
header(
'Content-Type: text/css; charset=utf-8'
);
26
35
function
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
48
sleep(
$wait
);
49
50
$css
=
"
56
$selector {
57
$property: $value;
58
}
59
";
60
61
echo trim(
$css
) .
"\n"
;
$value
$value
Definition
styleTest.css.php:45
$wait
$wait
Definition
styleTest.css.php:46
$selector
$selector
Definition
styleTest.css.php:43
$css
$css
Definition
styleTest.css.php:50
cssfilter
cssfilter( $val)
Allows characters in ranges [a-z], [A-Z] and [0-9], in addition to a dot ("."), dash ("-"),...
Definition
styleTest.css.php:35
$property
$property
Definition
styleTest.css.php:44
$params
$params
Definition
styleTest.css.php:40
tests
qunit
data
styleTest.css.php
Generated on Mon Nov 25 2024 15:36:45 for MediaWiki by
1.10.0