From: Florent Bruneau Date: Fri, 7 Nov 2008 16:22:28 +0000 (+0100) Subject: Wiki preview uses 'post' instead of 'get' (Closes #918) X-Git-Tag: xorg/0.10.0~36 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=41ec982a673728ae523d80943594e3795c9f7198;p=platal.git Wiki preview uses 'post' instead of 'get' (Closes #918) Signed-off-by: Florent Bruneau --- diff --git a/core b/core index 720e326..8b6e9f4 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 720e326185b09135267b32e2c85ca3d7beba37f2 +Subproject commit 8b6e9f4e18cb8fbce6bb44f88474493476daf87e diff --git a/htdocs/javascript/ajax.js b/htdocs/javascript/ajax.js index 30a2f6e..a5c5982 100644 --- a/htdocs/javascript/ajax.js +++ b/htdocs/javascript/ajax.js @@ -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 = ""; }