Changeset 5614
- Timestamp:
- 05/31/2007 12:22:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php
r4985 r5614 34 34 // Get input parameters. 35 35 36 $check = urldecode( $_REQUEST['check']);37 $cmd = sanitize( $_REQUEST['cmd']);38 $lang = sanitize( $_REQUEST['lang'], "strict");39 $mode = sanitize( $_REQUEST['mode'], "strict");40 $spelling = sanitize( $_REQUEST['spelling'], "strict");41 $jargon = sanitize( $_REQUEST['jargon'], "strict");42 $encoding = sanitize( $_REQUEST['encoding'], "strict");43 $sg = sanitize( $_REQUEST['sg'], "bool");36 $check = urldecode(getRequestParam('check')); 37 $cmd = sanitize(getRequestParam('cmd')); 38 $lang = sanitize(getRequestParam('lang'), "strict"); 39 $mode = sanitize(getRequestParam('mode'), "strict"); 40 $spelling = sanitize(getRequestParam('spelling'), "strict"); 41 $jargon = sanitize(getRequestParam('jargon'), "strict"); 42 $encoding = sanitize(getRequestParam('encoding'), "strict"); 43 $sg = sanitize(getRequestParam('sg'), "bool"); 44 44 $words = array(); 45 45 … … 82 82 83 83 return $str; 84 } 85 86 function getRequestParam($name, $default_value = false) { 87 if (!isset($_REQUEST[$name])) 88 return $default_value; 89 90 if (!isset($_GLOBALS['magic_quotes_gpc'])) 91 $_GLOBALS['magic_quotes_gpc'] = ini_get("magic_quotes_gpc"); 92 93 if (isset($_GLOBALS['magic_quotes_gpc'])) { 94 if (is_array($_REQUEST[$name])) { 95 $newarray = array(); 96 97 foreach($_REQUEST[$name] as $name => $value) 98 $newarray[stripslashes($name)] = stripslashes($value); 99 100 return $newarray; 101 } 102 return stripslashes($_REQUEST[$name]); 103 } 104 105 return $_REQUEST[$name]; 84 106 } 85 107
Note: See TracChangeset
for help on using the changeset viewer.