MDL-10680:
[moodle-linuxchix.git] / filter / tex / displaytex.php
blob4200aa87dc7fdad9d8c575d7ddb31c7cc582b2d3
1 <?php // $Id$
2 // This script displays tex source code.
4 require_once('../../config.php');
5 require_once($CFG->libdir.'/moodlelib.php');
7 $texexp = urldecode($_SERVER['QUERY_STRING']);
8 // entities are usually encoded twice, first in HTML editor then in tex/filter.php
9 $texexp = html_entity_decode(html_entity_decode($texexp));
10 // encode all entities (saves non-ISO)
11 $texexp = htmlentities($texexp,ENT_COMPAT,'utf-8');
13 <html>
14 <head>
15 <title>TeX Source</title>
16 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
17 </head>
18 <body bgcolor="#FFFFFF">
19 <?php echo $texexp; ?>
20 </body>
21 </html>