# HG changeset patch # User insilmaril # Date 1142430833 0 # Node ID 795d0eb5700f14df6619ae0444506a75ba54f967 # Parent 0e994bf2346b6f8a895065d0f7a539f2abbb6954 hide export for floatimages. diff -r 0e994bf2346b -r 795d0eb5700f noteobj.cpp --- a/noteobj.cpp Wed Mar 15 13:53:53 2006 +0000 +++ b/noteobj.cpp Wed Mar 15 13:53:53 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"); }