diff -r 6691000c3262 -r ffe2a4396694 noteobj.cpp --- a/noteobj.cpp Tue Jan 24 15:09:48 2006 +0000 +++ b/noteobj.cpp Fri Jun 16 08:27:11 2006 +0000 @@ -149,35 +149,28 @@ // in "Lucida B&H". This is invalid in XML and thus would crash // the XML parser uint pos=0; - uint pos2; bool inbracket=false; bool inquot=false; - while (pos") inbracket=false; - if (note.mid(pos,1)=="\"" && inbracket) + if (n.mid(pos,1)=="<") inbracket=true; + if (n.mid(pos,1)==">") inbracket=false; + if (n.mid(pos,1)=="\"" && inbracket) { if (!inquot) inquot=true; else inquot=false; } - if (note.mid(pos,1)=="&" && inquot) + if (n.mid(pos,1)=="&" && inquot) { // Now we are inside < " " > - // look for ending " - pos2=pos+1; - while (note.mid(pos2,1)!=";" && note.mid(pos2,1)!="\"") - pos2++; - if (note.mid(pos2,1)=="\"") - { - note.replace(pos,1,"&"); - pos=pos2; - } + n.replace(pos,1,"&"); + pos=pos+3; } pos++; } - return beginElement ("htmlnote",attribut("fonthint",fonthint)) + "\n"+ note+ "\n" +endElement ("htmlnote"); + return beginElement ("htmlnote",attribut("fonthint",fonthint)) + "\n"+ n+ "\n" +endElement ("htmlnote"); }