GNOME Bugzilla – Bug 690860
Rework serialization format to be XHTML
Last modified: 2013-01-02 23:41:11 UTC
The real issue is that everytime you add a new line in a note, libxml fails to parse <br> and nothing gets saved.
Created attachment 232371 [details] [review] Rework serialization format to be XHTML Trying to parse HTML using XML tools is hacky and prone to fail in spectacular ways. And when it fails, we risk losing data, which is very bad. Instead, we can make WebKit give us XM and store it directly, using XHTML. The downside of this is that we need to give WebKit the full document (including <html xmlns="..."><body>...). The upside is that, as we no longer parse the note content, anything that can be represented in XHTML (including images, forms, scripts, plugins...) can now be stored in a note.
Review of attachment 232371 [details] [review]: * Tomboy format : wrap_note_content should not be static, so in deserializer.c / process_tomboy_xml_content use it too (otherwise import fails). * Minor regression for notes icon : when bijiben is closed and reopened, the deserializer do not respect end of lines regarding "raw text" data. But losing data is so cruel that I shall rather fix this afterward. * The slight syntax fix on shell provider might be included in another patch rather this one.
Yes, I noticed both bugs in later testing; I will prepare a better patch.
Created attachment 232587 [details] [review] Rework serialization format to be XHTML Trying to parse HTML using XML tools is hacky and prone to fail in spectacular ways. And when it fails, we risk losing data, which is very bad. Instead, we can make WebKit give us XM and store it directly, using XHTML. The downside of this is that we need to give WebKit the full document (including <html xmlns="..."><body>...). The upside is that, as we no longer parse the note content, anything that can be represented in XHTML (including images, forms, scripts, plugins...) can now be stored in a note. Now newlines should work again...
Review of attachment 232587 [details] [review]: Cool, this one fixed everything
Attachment 232587 [details] pushed as 817a185 - Rework serialization format to be XHTML