MDL-12161 Stripped slashes in LO titles
authorbobopinna <bobopinna>
Thu, 15 Nov 2007 08:37:11 +0000 (08:37 +0000)
committerbobopinna <bobopinna>
Thu, 15 Nov 2007 08:37:11 +0000 (08:37 +0000)
mod/scorm/datamodels/aicclib.php
mod/scorm/datamodels/scorm_12lib.php
mod/scorm/datamodels/scorm_13lib.php

index 919a93c..4c6faa5 100644 (file)
@@ -357,6 +357,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
         
         foreach ($scoes as $sco) {
             $isvisible = false;
+            $sco->title = stripslashes($sco->title);
             if ($optionaldatas = scorm_get_sco($sco->id, SCO_DATA)) {
                 if (!isset($optionaldatas->isvisible) || (isset($optionaldatas->isvisible) && ($optionaldatas->isvisible == 'true'))) {
                     $isvisible = true;
@@ -480,11 +481,11 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         if ($sco->id == $scoid) {
                             $result->prerequisites = false;
                         }
-                        $result->toc .= $statusicon.'&nbsp;'.$sco->title."</li>\n";
+                        $result->toc .= $statusicon.'&nbsp;'.format_string($sco->title)."</li>\n";
                     }
                 }
             } else {
-                $result->toc .= '&nbsp;'.$sco->title."</li>\n";
+                $result->toc .= '&nbsp;'.format_string($sco->title)."</li>\n";
             }
             if (($nextsco !== false) && ($nextid == 0) && ($findnext)) {
                 if (!empty($nextsco->launch)) {
index 591b18f..83235e2 100644 (file)
@@ -213,6 +213,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
         
         foreach ($scoes as $sco) {
             $isvisible = false;
+            $sco->title = stripslashes($sco->title);
             if ($optionaldatas = scorm_get_sco($sco->id, SCO_DATA)) {
                 if (!isset($optionaldatas->isvisible) || (isset($optionaldatas->isvisible) && ($optionaldatas->isvisible == 'true'))) {
                     $isvisible = true;
@@ -338,11 +339,11 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         if ($sco->id == $scoid) {
                             $result->prerequisites = false;
                         }
-                        $result->toc .= $statusicon.'&nbsp;'.$sco->title."</li>\n";
+                        $result->toc .= $statusicon.'&nbsp;'.format_string($sco->title)."</li>\n";
                     }
                 }
             } else {
-                $result->toc .= '&nbsp;'.$sco->title."</li>\n";
+                $result->toc .= '&nbsp;'.format_string($sco->title)."</li>\n";
             }
             if (($nextsco !== false) && ($nextid == 0) && ($findnext)) {
                 if (!empty($nextsco->launch)) {
index db13ff6..4ddf69f 100644 (file)
@@ -63,6 +63,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
         $parents[$level]='/';
         foreach ($scoes as $sco) {
             $isvisible = false;
+            $sco->title = stripslashes($sco->title);
             if (isset($optionaldatas[$sco->identifier])) {
                 if (!isset($optionaldatas[$sco->identifier]->isvisible) || 
                    (isset($optionaldatas[$sco->identifier]->isvisible) && ($optionaldatas[$sco->identifier]->isvisible == 'true'))) {