]> git.mjollnir.org Git - moodle.git/commitdiff
Bug #1611 - Fixed the editing of wiki pages containing apostrophes.
authormchurch <mchurch>
Tue, 24 Aug 2004 00:08:08 +0000 (00:08 +0000)
committermchurch <mchurch>
Tue, 24 Aug 2004 00:08:08 +0000 (00:08 +0000)
mod/wiki/view.php

index b5681c027e24fa46e195db4089b918fde23ecd27..a05b8ad5625460d48546cfe0ba99e3f33d948a11 100644 (file)
@@ -70,7 +70,8 @@
 ///     or the default value in the 'lang' file if the specified value was empty.
         define("EWIKI_PAGE_INDEX",$wiki_entry->pagename);
 
-        $wikipage = ($wikipage === false) ?  EWIKI_PAGE_INDEX: $wikipage;
+        /// If the page has a ' in it, it may have slashes added to it. Remove them if it does.
+        $wikipage = ($wikipage === false) ?  stripslashes(EWIKI_PAGE_INDEX) : stripslashes($wikipage);
 
 ///     ### Prevent ewiki getting id as PageID...
         unset($_REQUEST["id"]);
     if ($canedit) {   /// Print tabs with commands for this page
         $tabstyle = ' style="padding-left: 5px;padding-right: 5px" ';
 
-        echo "<table border=0>";
-        echo "<tr>";
+        echo '<table border="0">';
+        echo '<tr>';
         $tabs = array('view', 'edit','links','info');
         if ($binary) {
             $tabs[] = 'attachments';
                 echo '<td class="generaltabselected" '.$tabstyle.' bgcolor="'.$THEME->cellcontent.'">'.$tabname.'</td>';
             }
         }
-        echo "</tr>";
-        echo "</table>";
+        echo '</tr>';
+        echo '</table>';
     }
     print_simple_box_start( "right", "100%", "$THEME->cellcontent", "20");
 
 
 /// Finish the page
     print_footer($course);
-?>
+?>
\ No newline at end of file