MediaWiki
REL1_22
|
00001 <?php 00025 header( 'Content-Type: text/css; charset=utf-8' ); 00026 00035 function cssfilter( $val ) { 00036 return preg_replace( '/[^A-Za-z0-9\.\- #]/', '', $val ); 00037 } 00038 00039 // Do basic sanitization 00040 $params = array_map( 'cssfilter', $_GET ); 00041 00042 // Defaults 00043 $selector = isset( $params['selector'] ) ? $params['selector'] : '.mw-test-example'; 00044 $property = isset( $params['prop'] ) ? $params['prop'] : 'float'; 00045 $value = isset( $params['val'] ) ? $params['val'] : 'right'; 00046 $wait = isset( $params['wait'] ) ? (int)$params['wait'] : 0; // seconds 00047 00048 sleep( $wait ); 00049 00050 $css = " 00056 $selector { 00057 $property: $value; 00058 } 00059 "; 00060 00061 echo trim( $css ) . "\n";