From c9b07025ceb5ff50dcae2d845bcdc63efb000d7d Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sun, 7 Apr 2013 05:56:27 -0400 Subject: css and bug fixes --- askbot/models/post.py | 4 +++- askbot/templates/question/content.html | 4 +++- askbot/utils/markup.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/askbot/models/post.py b/askbot/models/post.py index 10003e57..42905f65 100644 --- a/askbot/models/post.py +++ b/askbot/models/post.py @@ -609,8 +609,10 @@ class Post(models.Model): return markup.plain_text_input_converter elif parser_type == 'markdown': return markup.markdown_input_converter - elif parser_type == 'tynymce': + elif parser_type == 'tinymce': return markup.tinymce_input_converter + else: + raise NotImplementedError def has_group(self, group): """true if post belongs to the group""" diff --git a/askbot/templates/question/content.html b/askbot/templates/question/content.html index bc08e789..d07c3727 100644 --- a/askbot/templates/question/content.html +++ b/askbot/templates/question/content.html @@ -24,15 +24,17 @@ {# buttons below cannot be cached yet #} {% if user_already_gave_answer %} +
{% trans %}Edit Your Previous Answer{% endtrans %} {% trans %}(only one answer per question is allowed){% endtrans %} -
+ +
{% else %} {% include "question/new_answer_form.html" %} {% endif %} diff --git a/askbot/utils/markup.py b/askbot/utils/markup.py index 33d0522e..b96cf42d 100644 --- a/askbot/utils/markup.py +++ b/askbot/utils/markup.py @@ -202,7 +202,7 @@ def markdown_input_converter(text): text = get_parser().convert(text) return sanitize_html(text) -def tinymce_input_parser(text): +def tinymce_input_converter(text): """tinymce input to production html converter""" text = urlize(text) return strip_tags(text, ['script', 'style', 'link']) -- cgit v1.2.3-1-g7c22