From 061989479789bd7369898789410d4bd06e8268a7 Mon Sep 17 00:00:00 2001 From: Cindy Li Date: Thu, 8 Sep 2011 16:09:24 +0000 Subject: [PATCH] http://atutor.ca/atutor/mantis/view.php?id=4597 - An ATutor bug report, however, the same issue happens in AContent, which is what this check-in is for. --- docs/home/editor/editor_tab_functions.inc.php | 6 +++--- docs/home/editor/editor_tabs/alternatives.inc.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/home/editor/editor_tab_functions.inc.php b/docs/home/editor/editor_tab_functions.inc.php index 63a0c6e..c534222 100644 --- a/docs/home/editor/editor_tab_functions.inc.php +++ b/docs/home/editor/editor_tab_functions.inc.php @@ -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 diff --git a/docs/home/editor/editor_tabs/alternatives.inc.php b/docs/home/editor/editor_tabs/alternatives.inc.php index 714b8d2..fe3d119 100644 --- a/docs/home/editor/editor_tabs/alternatives.inc.php +++ b/docs/home/editor/editor_tabs/alternatives.inc.php @@ -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'); -- 2.17.1