]> git.openstreetmap.org Git - osqa.git/commitdiff
Applies some of the Justin Grant's patches.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 10 Nov 2010 11:38:52 +0000 (11:38 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 10 Nov 2010 11:38:52 +0000 (11:38 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@612 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/skins/default/templates/base_content.html
forum/skins/default/templates/header.html
forum/skins/default/templates/node/contributors_info.html
forum/skins/default/templates/sidebar/user_blocks.html
forum/utils/html.py
forum/views/writers.py

index f92161edcb0aa0dbfef0bce479a410489264d6c8..b0ee37dc68f44db0ab820e51c25af1995c6ddb41 100644 (file)
@@ -75,7 +75,7 @@
         </div>
         {% if settings.USE_CUSTOM_HEADER|or_preview:request %}
             <div id="custom_header">
-                {{ settings.CUSTOM_HEADER|or_preview:request|markdown:"settingsparser" }}    
+                {{ settings.CUSTOM_HEADER|or_preview:request|safe }}
             </div>
         {% endif %}
         {% include "header.html" %}
         {% if settings.USE_CUSTOM_FOOTER|or_preview:request %}
             {% ifequal settings.CUSTOM_FOOTER_MODE|or_preview:request "above" %}
                 <div id="custom_footer">
-                    {{ settings.CUSTOM_FOOTER|or_preview:request|markdown:"settingsparser" }}
+                    {{ settings.CUSTOM_FOOTER|or_preview:request|safe }}
                 </div>
             {% endifequal %}
             <div id="ground">
                 {% ifequal settings.CUSTOM_FOOTER_MODE|or_preview:request "replace" %}
-                    {{ settings.CUSTOM_FOOTER|or_preview:request|markdown:"settingsparser" }}
+                    {{ settings.CUSTOM_FOOTER|or_preview:request|safe }}
                 {% else %}
                     {% include "footer.html" %}
                 {% endifequal %}
             </div>
             {% ifequal settings.CUSTOM_FOOTER_MODE|or_preview:request "below" %}
                 <div id="custom_footer">
-                    {{ settings.CUSTOM_FOOTER|or_preview:request|markdown:"settingsparser" }}
+                    {{ settings.CUSTOM_FOOTER|or_preview:request|safe }}
                 </div>
             {% endifequal %}
         {% else %}
index 5e6e10fdd8d24e81fc9c369cdb5de7590d51da74..f853916af9955aa0b833a245269ce87684c93f63 100644 (file)
@@ -40,8 +40,8 @@
 
        {% if settings.USE_ANNOUNCEMENT_BAR|or_preview:request %}
   <div id="announcement">
-      {{ settings.ANNOUNCEMENT_BAR|or_preview:request|markdown:"settingsparser" }}
+      {{ settings.ANNOUNCEMENT_BAR|or_preview:request|safe }}
   </div>
   {% endif %}
 
-<!-- end template header.html -->
\ No newline at end of file
+<!-- end template header.html -->
index 80121eafd5803e78774cdb106ca294997fe12d2a..3ed461b95d51a68e31b87a8ea41f7d66164aac1a 100644 (file)
@@ -1,5 +1,5 @@
 {% load extra_tags %}
-<div class='post-update-info'>
+<div class='post-update-info post-update-info-user'>
     <p style="line-height:12px;">
         {{ node_verb }}
         <strong>{% diff_date node.added_at %}</strong>
@@ -9,7 +9,7 @@
     {% get_score_badge node.author %}</p>
 </div>
 {% if node.last_edited %}
-    <div class='post-update-info'>
+    <div class='post-update-info post-update-info-edited'>
         <p style="line-height:12px;">
             <a href="{{ node.get_revisions_url }}">
                 {{ node.last_edited.verb }}
index b7fd4b2be096c5201f9fdb21084f314a877bfe0a..d3d98cc27ac925ea2e1fccde5dbbf0bb721dc598 100644 (file)
@@ -3,7 +3,7 @@
 {% if show %}
 {% if wrap %}<div id="{{ blockid }}" class="boxC">
     <div class="body">{% endif %}
-        {{ content|markdown }}
+        {{ content }}
      {% if wrap %}</div>
 </div>{% endif %}
-{% endif %}
\ No newline at end of file
+{% endif %}
index cab52a4252ecd666dc5c9e06958a5f0300cde9bc..6afaf62ac3978f62ad6933b2a29ceb3679ef50c9 100644 (file)
@@ -1,6 +1,6 @@
 """Utilities for working with HTML."""
-import html5lib
-from html5lib import sanitizer, serializer, tokenizer, treebuilders, treewalkers
+#import html5lib
+from html5lib import sanitizer, serializer, tokenizer, treebuilders, treewalkers, HTMLParser
 from django.utils.html import strip_tags
 from forum.utils.html2text import HTML2Text
 from django.template import mark_safe
@@ -39,7 +39,7 @@ class HTMLSanitizer(tokenizer.HTMLTokenizer, HTMLSanitizerMixin):
 
 def sanitize_html(html):
     """Sanitizes an HTML fragment."""
-    p = html5lib.HTMLParser(tokenizer=HTMLSanitizer,
+    p = HTMLParser(tokenizer=HTMLSanitizer,
                             tree=treebuilders.getTreeBuilder("dom"))
     dom_tree = p.parseFragment(html)
     walker = treewalkers.getTreeWalker("dom")
index 07364f7647da985ff2c8547316504abcf9a7af7f..125318b765edee0a8c65bdbb57bb5bcc1f629dd7 100644 (file)
@@ -107,6 +107,7 @@ def ask(request):
 
     return render_to_response('ask.html', {
         'form' : form,
+        'tab' : 'ask'
         }, context_instance=RequestContext(request))
 
 def edit_question(request, id):