| Summary: | HTML output is wrong for filenames with spaces | ||
|---|---|---|---|
| Product: | [Applications] kfind | Reporter: | 0mecir |
| Component: | general | Assignee: | Eric Coquelle <coquelle> |
| Status: | CLOSED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Mandrake RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
0mecir
2002-08-10 10:39:27 UTC
If someone fixes it, please also remove the <!DOCTYPE %1>, which should be replaced by a "generated by kfind" comment. Fixed in HEAD. Diff:
Index: kfwin.cpp
===================================================================
RCS file: /home/kde/kdebase/kfind/kfwin.cpp,v
retrieving revision 1.66
diff -u -p -r1.66 kfwin.cpp
--- kfwin.cpp 10 Sep 2002 09:51:20 -0000 1.66
+++ kfwin.cpp 2 Mar 2003 19:13:24 -0000
@@ -228,7 +228,7 @@ void KfindWindow::saveResults()
item = firstChild();
while(item != NULL)
{
- QString path=((KfFileLVI*)item)->fileitem.url().url();
+ QString path=((KfFileLVI*)item)->fileitem.url().prettyURL();
QString pretty=((KfFileLVI*)item)->fileitem.url().prettyURL();
stream << QString::fromLatin1("<DT><A HREF=\"%1\">%2</A>\n")
.arg(path).arg(pretty);
@@ -241,7 +241,7 @@ void KfindWindow::saveResults()
item = firstChild();
while(item != NULL)
{
- QString path=((KfFileLVI*)item)->fileitem.url().url();
+ QString path=((KfFileLVI*)item)->fileitem.url().prettyURL();
stream << path << endl;
item = item->nextSibling();
}
Subject: Re: kdebase/kfind On Monday 03 March 2003 13:23, Dominik Seichter wrote: > CVS commit by domseichter: > > fix for bug 46320: filenames containing spaces are saved correctly into the > html output file. This fix looks rather wrong to me. Why do you think that you have to use prettyURL() here? Cheers, Waldo Subject: Re: kdebase/kfind Am Montag, 3. März 2003 13:32 schrieb Waldo Bastian: > On Monday 03 March 2003 13:23, Dominik Seichter wrote: > > CVS commit by domseichter: > > > > fix for bug 46320: filenames containing spaces are saved correctly into > > the html output file. > > This fix looks rather wrong to me. Why do you think that you have to use > prettyURL() here? Well, because it works for me. I can't give a better reason though. I asked an core-devel yesterday and no one complained, so I thought it is save to commit :-). If this fix makes things worse, I can revert it of course. CU Dom A fixed patch was commited to HEAD and Branch. prettyURL() was removed from
my patch, because it was _really_ wrong.
The problem was that a space is encoded as "%20" and the following code was
used to write the link to the file. You will see that we there are two %2 in the
line now, if a file containing a space is written.
stream << QString::fromLatin1("<DT><A HREF=\"%1\">%2</A>\n")
.arg(path).arg(pretty);
|