aboutsummaryrefslogtreecommitdiffstats
path: root/test/data/with_fries_over_jsonp.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/data/with_fries_over_jsonp.php')
-rw-r--r--test/data/with_fries_over_jsonp.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/data/with_fries_over_jsonp.php b/test/data/with_fries_over_jsonp.php
index 456aeb3bd..7de47d125 100644
--- a/test/data/with_fries_over_jsonp.php
+++ b/test/data/with_fries_over_jsonp.php
@@ -1,7 +1,11 @@
<?php
error_reporting(0);
+function cleanCallback( $callback ) {
+ return preg_replace( '/[^a-z0-9_]/i', '', $callback );
+}
$callback = $_REQUEST['callback'];
+$cleanCallback = cleanCallback( $callback );
$json = $_REQUEST['json'];
$text = json_encode(file_get_contents(dirname(__FILE__)."/with_fries.xml"));
-echo "$callback($text)";
+echo "$cleanCallback($text)\n";
?>