disabling Note.sanitize_html in gdrive processing as a workaround
authorSeth Woodworth <seth@sethish.com>
Tue, 2 Jul 2013 20:48:44 +0000 (16:48 -0400)
committerSeth Woodworth <seth@sethish.com>
Tue, 2 Jul 2013 20:48:44 +0000 (16:48 -0400)
karmaworld/apps/notes/gdrive.py

index c12268d2f84e260337ffbea80fce9db75ad205d9..a89ef7beaeed82794f80527b2f85b169ad7b56a9 100644 (file)
@@ -164,13 +164,12 @@ def convert_with_google_drive(note):
 
     content_dict = download_from_gdrive(file_dict, http, extension)
 
-
     # Get a new copy of the file from the database with the new metadata from filemeta
     new_note = Note.objects.get(id=note.id)
+
     if extension.lower() == '.pdf':
         new_note.file_type = 'pdf'
 
-
     elif extension.lower() in ['.ppt', '.pptx']:
         new_note.file_type = 'ppt'
         now = datetime.datetime.utcnow()
@@ -188,7 +187,6 @@ def convert_with_google_drive(note):
         _writer.write(content_dict['pdf'])
         _writer.close()
 
-
         new_note.pdf_file = _path
 
     else:
@@ -199,7 +197,8 @@ def convert_with_google_drive(note):
     new_note.text = content_dict['text']
 
     # before we save new html, sanitize a tags in note.html
-    new_note.sanitize_html(save=False)
+    #new_note.sanitize_html(save=False)
+    #FIXME: ^^^ disabled until we can get html out of an Etree html element
 
     # Finally, save whatever data we got back from google
     new_note.save()