http://atutor.ca/atutor/mantis/view.php?id=4597 - An ATutor bug report, however,...
authorCindy Li <cli@ocad.ca>
Thu, 8 Sep 2011 16:09:24 +0000 (16:09 -0000)
committerCindy Li <cli@ocad.ca>
Thu, 8 Sep 2011 16:09:24 +0000 (16:09 -0000)
docs/home/editor/editor_tab_functions.inc.php
docs/home/editor/editor_tabs/alternatives.inc.php

index 63a0c6e..c534222 100644 (file)
@@ -166,7 +166,7 @@ function populate_a4a($cid, $content, $formatting){
 
 // save all changes to the DB
 function save_changes($redir, $current_tab) {
-       global $contentManager, $addslashes, $msg, $_course_id, $_content_id;
+       global $contentManager, $addslashes, $msg, $_course_id, $_content_id, $stripslashes;
        
        $_POST['pid']   = intval($_POST['pid']);
        $_POST['_cid']  = intval($_POST['_cid']);
@@ -176,10 +176,10 @@ function save_changes($redir, $current_tab) {
        $_POST['title'] = trim($_POST['title']);
        $_POST['head']  = trim($_POST['head']);
        $_POST['use_customized_head']   = isset($_POST['use_customized_head'])?$_POST['use_customized_head']:0;
-       $_POST['body_text']     = trim($_POST['body_text']);
+       $_POST['body_text']     = $stripslashes(trim($_POST['body_text']));
        $_POST['weblink_text'] = trim($_POST['weblink_text']);
        $_POST['formatting'] = intval($_POST['formatting']);
-       $_POST['keywords']      = trim($_POST['keywords']);
+       $_POST['keywords']      = $stripslashes(trim($_POST['keywords']));
        $_POST['test_message'] = trim($_POST['test_message']);
 
        //if weblink is selected, use it
index 714b8d2..fe3d119 100644 (file)
@@ -99,8 +99,8 @@ if ($_POST['formatting'] <> 1)
        $msg->addFeedback('NO_A4A_FOR_PLAIN_TEXT');
        $msg->printAll();
 } else {
-       global $db, $content_row;
-       populate_a4a($cid, $_POST['body_text'], $_POST['formatting']);
+       global $db, $content_row, $stripslashes;
+       populate_a4a($cid, $stripslashes($_POST['body_text']), $_POST['formatting']);
        
        include_once(TR_INCLUDE_PATH.'classes/A4a/A4a.class.php');