Wiki preview uses 'post' instead of 'get' (Closes #918)
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 7 Nov 2008 16:22:28 +0000 (17:22 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 7 Nov 2008 16:22:28 +0000 (17:22 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
core
htdocs/javascript/ajax.js

diff --git a/core b/core
index 720e326..8b6e9f4 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 720e326185b09135267b32e2c85ca3d7beba37f2
+Subproject commit 8b6e9f4e18cb8fbce6bb44f88474493476daf87e
index 30a2f6e..a5c5982 100644 (file)
@@ -128,7 +128,7 @@ function showTempMessage(id, message, success)
 
 function previewWiki(idFrom, idTo, withTitle, idShow)
 {
-    var text = encodeURIComponent(document.getElementById(idFrom).value);
+    var text = document.getElementById(idFrom).value;
     if (text == "") {
         return false;
     }
@@ -136,7 +136,11 @@ function previewWiki(idFrom, idTo, withTitle, idShow)
     if (!withTitle) {
         url += "/notitle";
     }
-    Ajax.update_html(idTo, url + "?text=" + text);
+    $.post(url, { text: text },
+        function(data) {
+            $("#" + idTo).html(data);
+        },
+        'text');
     if (idShow != null) {
         document.getElementById(idShow).style.display = "";
     }