From 6c63633545c254dc085402e0f927a6826d1dd229 Mon Sep 17 00:00:00 2001 From: Akinori Ito Date: Fri, 9 Nov 2001 04:59:17 +0000 Subject: Updates from 0.2.1 into 0.2.1-inu-1.5 --- w3mbookmark.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'w3mbookmark.c') diff --git a/w3mbookmark.c b/w3mbookmark.c index 61b4d8c..74b32e5 100644 --- a/w3mbookmark.c +++ b/w3mbookmark.c @@ -27,8 +27,8 @@ static char *bkmark_src2 = "New Section:Title:\n\ \n\ \n\ - - +\ +\ \n"; static char *default_section = "̤ʬÎà"; #else /* LANG != JA */ @@ -48,8 +48,8 @@ static char *bkmark_src2 = "New Section:Title:\n\ \n\ \n\ - - +\ +\ \n"; static char *default_section = "Miscellaneous"; #endif /* LANG != JA */ @@ -84,6 +84,7 @@ print_bookmark_panel(char *bmark, char *url, char *title) if ((f = fopen(bmark, "r")) != NULL) { printf("Section:\n"); } - printf(bkmark_src2, htmlquote_str(url), htmlquote_str(title),Local_cookie); + printf(bkmark_src2, html_quote(url), html_quote(title),Local_cookie); } /* create new bookmark */ @@ -142,9 +143,9 @@ insert_bookmark(char *bmark, struct parsed_tagarg *data) /* Bookmark not added */ return FALSE; } - url = htmlquote_str(url); - title = htmlquote_str(title); - section = htmlquote_str(section); + url = html_quote(url); + title = html_quote(title); + section = html_quote(section); f = fopen(bmark, "r"); if (f == NULL) @@ -157,15 +158,19 @@ insert_bookmark(char *bmark, struct parsed_tagarg *data) break; if (Strcasecmp(tmp, section_tmp) == 0) section_found = 1; - if (section_found && !bmark_added && Strcmp_charp(tmp, end_section) == 0) { - pushText(tl, Sprintf("
  • %s\n", url, title)->ptr); - bmark_added = 1; + if (section_found && !bmark_added) { + Strremovefirstspaces(tmp); + if (Strcmp_charp(tmp, end_section) == 0) { + pushText(tl, Sprintf("
  • %s\n", url, title)->ptr); + bmark_added = 1; + } } if (!bmark_added && Strcasecmp_charp(tmp, "\n") == 0) { pushText(tl, Sprintf("

    %s

    \n\n"); + bmark_added = 1; } pushText(tl, tmp->ptr); } -- cgit v1.2.3