lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Bookmark remove bug in Lynx 2.8


From: Leonid Pauzner
Subject: Re: lynx-dev Bookmark remove bug in Lynx 2.8
Date: Sat, 13 Jun 1998 13:25:07 +0400 (MSD)

>      * Subject: lynx-dev Bookmark remove bug in Lynx 2.8
>      * From: Alachua Freenet Administrative/Tech Support <address@hidden>
>      * Date: Fri, 12 Jun 1998 12:50:55 -0400 (EDT)
>      * Reply-To: address@hidden
>      * Sender: address@hidden
>      _________________________________________________________________
>
>
> I discovered a bug in Lynx 2.8 (and probably earlier versions) where the
> Remove bookmark feature does not work correctly.
>
> A user on my system had a large bookmarks file (over 200 bookmarks) and when
> she tried to delete a bookmark, it would not remove the highlighted bookmark
> but instead delete one several bookmarks before the highlighted entry.
>
I saw this behavior myself. After I spent some time for investigation
it happens this was _after_ my hand editing of bookmarks.html:
I add one more space before href= or so (HTML syntax was not changed of cause),
but this affects a very strict check in LYBookmarks.c,
quoted from remove_bookmark_link():


    while (fgets(buf, sizeof(buf), fp) != NULL) {
        if(line >= 0) {
            endline = &buf[strlen(buf)-1];
            if(*endline == '\n')
                *endline = '\0';
            if((line % 2) == 0) { /* even lines */
                if(*buf != '\0') {
                    strtok(buf," "); /* kill everything after the space */
                    fprintf(nfp,"<LI><a href=\"%s\">",buf); /* the URL */
                }
            } else { /* odd lines */
                fprintf(nfp,"%s</a>\n",buf);  /* the title */
            }
        }
        /* else - ignore the line (this gets rid of first two lines) */
        line++;
    }
    LYCloseTempFP(nfp);
    fclose(fp);
    return(newfile);
}


The same in all versions of Lynx;
seems we need more tolerant check here, NOT fixed yet.



> It turned out she had about 4 bookmarks early in the file where there was no
> link text for the bookmark. I.E. the entries resembled:
>
> <a href="http://www.foo.org/";></a>
>
> and when viewed these entries would be numbered but there would be no link
> text:
>
> 12. Such-and-such webpage
> 13.
> 14. Another webpage
>
> This appears to confuse the bookmark removal system. Since the user has been
> on AFN for sometime and we've only relatively recently upgraded to Lynx 2.8,
> the bad entries in her bookmarks file may have been generated by an older
> version of Lynx. Presumably that occured because she added a bookmark for a
> page that had no Title entry and she didn't enter any text for the bookmark
> title.
>
> I haven't had the time to look at the code and add my own fix for this
> problem but will probably be doing so in the future. I wanted to pass on the
> bug-report however. Apologies if this has been reported before, I was unable
> to determine if there have been prior reports of this problem.
>
> --Jeff Mercer,
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>                * Alachua Freenet Administrative & Tech Support *
>                                 address@hidden
>
>      _________________________________________________________________
>
>    Follow-Ups:
>      * Re: lynx-dev Bookmark remove bug in Lynx 2.8
>
>      * From: "T.E.Dickey" <address@hidden>
>      _________________________________________________________________
>
>      * Prev: Re: lynx-dev configuring lynx 2.8
>      * Next: lynx-dev Minor problem with Lynx
>      * Index(es):
>           + Main
>           + Thread
>      _________________________________________________________________
>
>    Lynx mailing list archives
>
>    [FLORA HOME] [LYNX Home]
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]