diff --git a/formats/mf2.php b/formats/mf2.php new file mode 100644 index 0000000..a80605a --- /dev/null +++ b/formats/mf2.php @@ -0,0 +1,35 @@ +' . "\n"; + if( isset($obj['text']) ) { + $out .= "\t" . '' . htmlspecialchars($obj['text']) . '' . "\n"; + } + $out .= "\t" . '' . $coord[0] . '' . "\n"; + $out .= "\t" . '' . $coord[1] . '' . "\n"; + $out .= '

' . "\n"; + } + } + } + return $out; + } + + public function test( $header ) { + return false; + } + + public function import( $file ) { + } +} + +$formats['mf2'] = new MF2Format(); diff --git a/index.php b/index.php index ec3b484..b9c6e95 100644 --- a/index.php +++ b/index.php @@ -118,7 +118,7 @@ } } -if( isset($_REQUEST['format']) && preg_match('/^[a-z]+$/', $_REQUEST['format']) ) { +if( isset($_REQUEST['format']) && preg_match('/^[a-z0-9]+$/', $_REQUEST['format']) ) { $format = $_REQUEST['format']; header('Access-Control-Allow-Origin: *'); $result = export($format, $title, $bbcode, isset($scodeid) ? $scodeid : '', !isset($_REQUEST['direct']));