Using the ampersand character (&) in note title messes up sync

Bug #490969 reported by Cornelius Hald on 2009-12-01
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Ubuntu One Servers
Medium
Rodrigo Moya

Bug Description

When using an ampersand character in the title of a note, synchronization between Tomboy and Ubuntu One stops working or the title is messing up. There are two options:

1) Create a note with the title "Peter & Paul" via the Ubuntu One web interface. Then try to sync Tomboy. Tomboy fails to sync without giving details. I'll attach the exception.
After that rename the note to "Peter and Paul" again using the web interface. Then try to sync Tomboy. It works as expected.

2) Create a note with the title "Peter & Paul" via Tomboy. Then try to sync Tomboy. It will work, but the note title on Ubuntu One is messed up. It now reads "Peter & Paul". I'll attach screenshots.

This bug might be related to #484683, #482372, #479417 and #484142

Cornelius Hald (hald) wrote :
visibility: private → public
Cornelius Hald (hald) wrote :
Cornelius Hald (hald) wrote :

12/1/2009 7:30:09 PM [ERROR]: Synchronization failed with the following exception: a name did not start with a legal character 32 ( ) Line 4, position 63.
  at Mono.Xml2.XmlTextReader.ReadName (System.String& prefix, System.String& localName) [0x00000]
  at Mono.Xml2.XmlTextReader.ReadName () [0x00000]
  at Mono.Xml2.XmlTextReader.ReadEntityReference (Boolean ignoreEntityReferences) [0x00000]
  at Mono.Xml2.XmlTextReader.ReadReference (Boolean ignoreEntityReferences) [0x00000]
  at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000]
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000]
  at Mono.Xml2.XmlTextReader.Read () [0x00000]
  at System.Xml.XmlTextReader.Read () [0x00000]
  at Tomboy.Sync.NoteUpdate..ctor (System.String xmlContent, System.String title, System.String uuid, Int32 latestRevision) [0x00000]
  at Tomboy.WebSync.WebSyncServer.GetNoteUpdatesSince (Int32 revision) [0x00000]
  at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000]

Changed in ubuntuone-servers:
assignee: nobody → Rodrigo Moya (rodrigo-moya)
status: New → In Progress
Changed in ubuntuone-servers:
importance: Undecided → Medium

I'm guessing that this is caused by the XML<->HTML conversion code, since this bug isn't present in Snowy. So, once U1 stops converting every note, it should only impact notes edited in U1's online editor until the bug is fixed.

Rodrigo Moya (rodrigo-moya) wrote :

I've just submitted a branch that changes all notes to be stored in XML (all notes that you change, as an upgrade path, so notes already in HTML that are not changed will still be in HTML, but as soon as you edit them, they are stored in XML). As for the & in the title, fixing it now

Awesome, sounds like a good solution!

Changed in ubuntuone-servers:
status: In Progress → Fix Committed
Roman Yepishev (rye) on 2010-03-04
tags: added: double-escaping
Changed in ubuntuone-servers:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers