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

From: Nico Golde <nico_AT_ngolde.de>
Date: Mon, 2 Nov 2009 02:15:25 +0100

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?

Cheers
Nico

-- 
Nico Golde - http://www.ngolde.de - nion@jabber.ccc.de - GPG: 0xA0A0AAAA
For security reasons, all text in this mail is double-rot13 encrypted.

Received on Mon Nov 02 2009 - 01:15:25 UTC

This archive was generated by hypermail 2.2.0 : Mon Nov 02 2009 - 01:36:02 UTC