HTML-escape tablabels.
authorWilfried Goesgens <willi@arangodb.com>
Tue, 17 Nov 2015 18:59:31 +0000 (19:59 +0100)
committerWilfried Goesgens <willi@arangodb.com>
Tue, 17 Nov 2015 18:59:31 +0000 (19:59 +0100)
webcit/tabs.c
webcit/vcard_edit.c

index e644ec467f1e93f04ba06d6d7ca0e8a95ceeb387..4b58ba590a64c086ce8eba75dd18583f63ff4655 100644 (file)
@@ -127,7 +127,7 @@ void StrTabbedDialog(StrBuf *Target, int num_tabs, StrBuf *tabnames[]) {
                        ( (i==0) ? "tab_cell_label" : "tab_cell_edit" ),
                        i
                        );
                        ( (i==0) ? "tab_cell_label" : "tab_cell_edit" ),
                        i
                        );
-               StrBufAppendBuf(Target, tabnames[i], 0);
+               StrEscAppend(Target, tabnames[i], NULL, 0, 0);
                StrBufAppendBufPlain(
                        Target, 
                        HKEY(
                StrBufAppendBufPlain(
                        Target, 
                        HKEY(
index 975ea239f0f203783d33fda4b6ef7a43d3778522..eda369b42b253c3c23179b5e5fc5dc827d95e9db 100644 (file)
@@ -1080,7 +1080,7 @@ void do_addrbook_view(vcardview_struct* VS) {
        int tabfirst = 0;
        int tablast = 0;
        int page = 0;
        int tabfirst = 0;
        int tablast = 0;
        int page = 0;
-       const char **tablabels;
+       const StrBuf **tablabels;
        int num_ab = GetCount(VS->addrbook);
        HashList *headlines;
        HashPos *it;
        int num_ab = GetCount(VS->addrbook);
        HashList *headlines;
        HashPos *it;
@@ -1102,7 +1102,7 @@ void do_addrbook_view(vcardview_struct* VS) {
 
        num_pages = (GetCount(VS->addrbook) / NAMESPERPAGE) + 1;
 
 
        num_pages = (GetCount(VS->addrbook) / NAMESPERPAGE) + 1;
 
-       tablabels = malloc(num_pages * sizeof (char *));
+       tablabels = malloc(num_pages * sizeof (StrBuf *));
        if (tablabels == NULL) {
                return;
        }
        if (tablabels == NULL) {
                return;
        }
@@ -1132,11 +1132,10 @@ void do_addrbook_view(vcardview_struct* VS) {
                                StrBufAppendBuf(headline, a2->name, 0);
                        }
                }
                                StrBufAppendBuf(headline, a2->name, 0);
                        }
                }
-               tablabels[i] = ChrPtr(headline);
+               tablabels[i] = headline;
                Put(headlines, LKEY(i), headline, HFreeStrBuf);
        }
                Put(headlines, LKEY(i), headline, HFreeStrBuf);
        }
-
-       tabbed_dialog(num_pages, tablabels);
+       StrTabbedDialog(WC->WBuf, num_pages, tablabels);
        page = (-1);
 
 
        page = (-1);