[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: KOFFICE_1_3_BRANCH: koffice/tools/thesaurus
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2004-01-06 10:53:48
Message-ID: 200401061153.49092.nicolasg () snafu ! de
[Download RAW message or body]
On Sunday 04 January 2004 11:16, Jens Bäckman wrote:
> > --- koffice/tools/thesaurus/main.cc #1.40:1.40.2.1
> > @@ -681,4 +681,5 @@ void Thesaurus::wnExited(KProcess *)
> > }
> > // Escape XML:
> > + l = l.replace('&', "&");
> > l = l.replace(QRegExp("<"), "<");
> > l = l.replace(QRegExp(">"), ">");
>
> Isn't this wrong? After all, this would replace "&lt;" with "<",
> while it should be "<".
No, it is the right way.
Text at start: A&<>Z
Text after first replace: A&<>Z
Text after second replace: A&<>Z
Text after third replace: A&<>Z
Of course the other way round HTML/XML to normla text, you have to use &
to & as last (as your example shows it.)
Have a nice day!
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@mail.kde.org
> https://mail.kde.org/mailman/listinfo/koffice-devel
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic