From: mchurch Date: Tue, 24 Aug 2004 00:08:08 +0000 (+0000) Subject: Bug #1611 - Fixed the editing of wiki pages containing apostrophes. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=37d7e21482883264ca06c982bf8569e8a54dd36e;p=moodle.git Bug #1611 - Fixed the editing of wiki pages containing apostrophes. --- diff --git a/mod/wiki/view.php b/mod/wiki/view.php index b5681c027e..a05b8ad562 100644 --- a/mod/wiki/view.php +++ b/mod/wiki/view.php @@ -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"]); @@ -299,8 +300,8 @@ if ($canedit) { /// Print tabs with commands for this page $tabstyle = ' style="padding-left: 5px;padding-right: 5px" '; - echo ""; - echo ""; + echo '
'; + echo ''; $tabs = array('view', 'edit','links','info'); if ($binary) { $tabs[] = 'attachments'; @@ -315,8 +316,8 @@ echo ''; } } - echo ""; - echo "
'.$tabname.'
"; + echo ''; + echo ''; } print_simple_box_start( "right", "100%", "$THEME->cellcontent", "20"); @@ -337,4 +338,4 @@ /// Finish the page print_footer($course); -?> +?> \ No newline at end of file