Re: [dev] [surf] Bookmarks patch for 0.2

From: Tadeusz Sośnierz <tadzikes_AT_gmail.com>
Date: Mon, 2 Nov 2009 05:17:55 +0100

On 2-11-2009 02:15:25, Nico Golde wrote:
> Hi,
> * Tadeusz So??nierz <tadzikes_AT_gmail.com> [2009-10-20 16:36]:
> [...]
> > +showbmarks(Client *c, const Arg *arg) {
> > + /* I wonder if 4 kB is too much or not enough */
> > + char html[4096] = "";
> > + /* same here. time will tell */
> > + char uri[128];
> > + FILE *f;
> > + stop(c, NULL);
> > + f = fopen(bmarksfile, "r");
> > + while(fscanf(f, "%127s\n", uri) != EOF) {
> > + snprintf(&html[strlen(html)], sizeof(html) - strlen(html),
> > + "<a href='%s'>%s</a><br />", uri, uri);
>
> You may want to html escape the uri, not?
 
Well, there are some security reasons, if that's what you mean. But
my tiny investigation (I mean, entering query string to google
containing html tags) showed that they become urlencoded by the app
itself, so it seems safe to me. If there's anything I don't know, please
let me know.

Regards,
Ted

-- 
===========================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
Received on Mon Nov 02 2009 - 04:17:55 UTC

This archive was generated by hypermail 2.2.0 : Mon Nov 02 2009 - 05:24:02 UTC