http://atutor.ca/atutor/mantis/view.php?id=3063
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 2 Aug 2007 14:40:11 +0000 (14:40 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 2 Aug 2007 14:40:11 +0000 (14:40 -0000)
docs/include/html/editor_tabs/edit.inc.php
docs/include/lib/output.inc.php

index 495062e..8139792 100644 (file)
@@ -60,8 +60,7 @@ if (trim($_POST['body_text']) == '<br />') {
 }
 
 ?>
-
-               <textarea name="body_text" id="body_text" cols="" rows="20"><?php echo ContentManager::cleanOutput($_POST['body_text']); ?></textarea>  
+               <textarea name="body_text" id="body_text" cols="" rows="20"><?php echo htmlspecialchars($_POST['body_text']); ?></textarea>     
        </div>
        <div class="row">
                <?php require(AT_INCLUDE_PATH.'html/editor_tabs/content_code_picker.inc.php'); ?>
index 916223b..662747d 100644 (file)
@@ -754,7 +754,7 @@ function format_content($input, $html = 0, $glossary, $simple = false) {
 
        if (isset($_config_defaults['latex_server']) && $_config_defaults['latex_server']) {
                // see: http://www.forkosh.com/mimetex.html
-               $input = preg_replace('/\[tex\](.*?)\[\/tex\]/ie', "'<img src=\"'.\$_config_defaults['latex_server'].rawurlencode('$1').'\" align=\"middle\">'", $input);
+               $input = preg_replace('/\[tex\](.*?)\[\/tex\]/sie', "'<img src=\"'.\$_config_defaults['latex_server'].rawurlencode('$1').'\" align=\"middle\">'", $input);
        }
 
        if ($html) {