diff -r d6376f767d27 -r 12958f987bcf noteobj.cpp --- a/noteobj.cpp Sun Jun 08 19:26:07 2008 +0000 +++ b/noteobj.cpp Wed Jul 16 10:46:14 2008 +0000 @@ -51,6 +51,7 @@ QString NoteObj::getNoteASCII(const QString &indent, const int &width) { + // FIXME make use of width QString r=note; // Remove all ... @@ -167,12 +168,13 @@ { QString n=note; - // Remove the doctype, which will confuse parsing + // Remove the doctype, which will confuse parsing // with XmlReader in Qt >= 4.4 QRegExp rx(""); rx.setMinimal(true); n.replace (rx,""); - + + // QTextEdit may generate fontnames with unquoted &, like // in "Lucida B&H". This is invalid in XML and thus would crash // the XML parser @@ -183,6 +185,7 @@ bool inbracket=false; int begin_bracket=0; bool inquot=false; + while (pos1) { - rx.setPattern("style=\\s*\"(.*)\"\\s*style=\\s*\"(.*)\""); + rx.setPattern ("style=\\s*\"(.*)\"\\s*style=\\s*\"(.*)\""); s.replace(rx,"style=\"\\1 \\2\""); n.replace (begin_bracket,sl,s); pos=pos-(sl-s.length()); @@ -218,8 +221,6 @@ } pos++; } - - return beginElement ("htmlnote",attribut("fonthint",fonthint)) + "\n"+ n+ "\n" +endElement ("htmlnote"); }