summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-21 02:24:20 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-21 02:24:20 -0400
commit25b4c2b1b2e958e4c9034bfb58bfc4619589eba6 (patch)
tree22beba8e59bd8706c130ca56b9cc9de95c1a47e3
parent4d6b009b68a7ef687406b6288161f1cc09b0262b (diff)
downloadaskbot-25b4c2b1b2e958e4c9034bfb58bfc4619589eba6.tar.gz
askbot-25b4c2b1b2e958e4c9034bfb58bfc4619589eba6.tar.bz2
askbot-25b4c2b1b2e958e4c9034bfb58bfc4619589eba6.zip
fixed an accidental bug from the previous commit and hopefully, the fakepath issue
-rw-r--r--askbot/skins/common/media/js/editor.js5
-rw-r--r--askbot/views/readers.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/askbot/skins/common/media/js/editor.js b/askbot/skins/common/media/js/editor.js
index 2d1f5670..ae4f5aea 100644
--- a/askbot/skins/common/media/js/editor.js
+++ b/askbot/skins/common/media/js/editor.js
@@ -46,6 +46,11 @@ function ajaxFileUpload(imageUrl, startUploadHandler)
success: function (data, status)
{
var fileURL = $(data).find('file_url').text();
+ /*
+ * hopefully a fix for the "fakepath" issue
+ * https://www.mediawiki.org/wiki/Special:Code/MediaWiki/83225
+ */
+ fileURL = fileURL.replace(/\w:.*\\(.*)$/,'$1');
var error = $(data).find('error').text();
if(error != ''){
alert(error);
diff --git a/askbot/views/readers.py b/askbot/views/readers.py
index 97cf04df..8f19a802 100644
--- a/askbot/views/readers.py
+++ b/askbot/views/readers.py
@@ -552,7 +552,7 @@ def question(request, id):#refactor - long subroutine. display question body, an
'show_comment_position': show_comment_position,
}
- print render_into_skin('question.html', data, request)
+ return render_into_skin('question.html', data, request)
def revisions(request, id, post_type = None):
assert post_type in ('question', 'answer')