From 41ec982a673728ae523d80943594e3795c9f7198 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Fri, 7 Nov 2008 17:22:28 +0100 Subject: [PATCH] Wiki preview uses 'post' instead of 'get' (Closes #918) Signed-off-by: Florent Bruneau --- core | 2 +- htdocs/javascript/ajax.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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 = ""; } -- 2.1.4