correctly encode utf-8 filenames in json
[bookreader.git] / BookReaderIA / fulltext / abbyy_to_text.php
1 <?php
2 $ia = escapeshellarg($_GET['ia']);
3 $path = escapeshellarg($_GET['path']);
4 $file = escapeshellarg($_GET['file']);
5
6 $full = $_GET['path'] . '/' . $_GET['file'];
7 if (!is_readable($full)) {
8     header("HTTP/1.1 403 Forbidden");
9     exit(0);
10 }
11 header('Content-type: text/plain');
12 passthru("python extract_paragraphs.py $ia $path $file 2>&1");
13 ?>