Commits

Luke Plant committed 2c14b20

Fixed small bug with preview

  • Participants
  • Parent commits 81e9928

Comments (0)

Files changed (2)

File semanticeditor/utils/presentation.py

         else:
             parent = node
             name = known_nodes.get(parent)
-            if name is not None:
+            if name is not None and (n.tag in blockdef):
                 n.set('class', 'structural ' + "tag" + n.tag.lower() )
                 n.tag = "div"
                 n[:] = []
                 n.text = name
             else:
-                n[:] = []
-                n.tail = None
-                n.text = None
-                n.tag = None
+                node.remove(n)
 
 def extract_presentation(html):
     """

File semanticeditor/views.py

 def preview(request):
     html = request.POST.get('html', '').encode("utf-8")
     presentation = request.POST.get('presentation', '{}')
-    print html
-    print presentation
     presentation = simplejson.loads(presentation)
     _convert_pres(presentation)