[cpif] r250 - trunk/frontend-web

svn at argo.es svn at argo.es
Thu Jul 5 12:11:50 CEST 2007


Author: alvaro
Date: Thu Jul  5 12:11:49 2007
New Revision: 250

Log:
Fixes


Modified:
   trunk/frontend-web/parser_bbcode.py
   trunk/frontend-web/parser_html.py

Modified: trunk/frontend-web/parser_bbcode.py
==============================================================================
--- trunk/frontend-web/parser_bbcode.py	(original)
+++ trunk/frontend-web/parser_bbcode.py	Thu Jul  5 12:11:49 2007
@@ -11,7 +11,7 @@
     "u": ('<span style="text-decoration:underline">', '</span>', False, None), 
     "s": ('<strike>', '</strike>', False, 'strike'), 
     "size": ('<span style="font-size:%(arg)s">', '</span>', True, None), 
-    "code": ('<code><pre>', '</pre><code>', False, 'code'), 
+    "code": ('<code>', '<code>', False, 'code'), 
     "i": ('<em>', '</em>', False, 'em'), 
     "url": ('<a href="%(arg)s">', '</a>', True, 'a'), 
     "quote*": ('<blockquote>', '</blockquote>', False, None), 
@@ -108,14 +108,14 @@
     """Do the parsing.
     Should be called after _reset, and _tokenize."""
     def get_context():
-      return allowed_tags.get(stack[-1], None)[3] if stack else None
+      return allowed_tags.get(stack[-1], None)[3] if stack else self._context
     def check_context(tag):
       if allowed_tags[tag][3] == self._context and self._context:
         return False
       else:
         return True
     stack = []
-    self._parsed.append((True, self._tokens.pop(0), None))
+    self._parsed.append((True, self._tokens.pop(0), get_context()))
     while self._tags:
       tag = self._tags.pop(0)
       tag = tag.split("=", 1)

Modified: trunk/frontend-web/parser_html.py
==============================================================================
--- trunk/frontend-web/parser_html.py	(original)
+++ trunk/frontend-web/parser_html.py	Thu Jul  5 12:11:49 2007
@@ -6,7 +6,6 @@
     "b": [], 
     "s": [], 
     "i": [], 
-    "pre": [], 
     "code": [], 
     "em": [], 
     "strong": [], 



More information about the cpif mailing list