summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 007477d)
raw | patch | inline | side by side (parent: 007477d)
author | Florian Forster <ff@octo.it> | |
Sat, 19 Jun 2010 09:03:50 +0000 (11:03 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 19 Jun 2010 09:03:50 +0000 (11:03 +0200) |
src/action_list_graphs.c | patch | blob | history |
index 92d82d7e2e779092fa80c546cfceea20ba883634..964a436c53ef6435850a43a62f146c29e7f03c6c 100644 (file)
--- a/src/action_list_graphs.c
+++ b/src/action_list_graphs.c
memset (desc, 0, sizeof (desc));
graph_get_title (cfg, desc, sizeof (desc));
+ html_escape_buffer (desc, sizeof (desc));
printf (" <li>%s\n <ul>\n", desc);
memset (params, 0, sizeof (params));
inst_get_params (cfg, inst, params, sizeof (params));
+ html_escape_buffer (params, sizeof (params));
memset (desc, 0, sizeof (desc));
inst_describe (cfg, inst, desc, sizeof (desc));
+ html_escape_buffer (desc, sizeof (desc));
printf (" <li><a href=\"%s?action=graph;%s\">%s</a></li>\n",
script_name (), params, desc);
static int list_graphs_html (const char *term) /* {{{ */
{
callback_data_t data = { NULL, /* limit = */ 20 };
+ char *term_html;
+
+ term_html = NULL;
+ if (term != NULL)
+ term_html = html_escape (term);
+
printf ("Content-Type: text/html\n\n");
printf ("<html>\n <head>\n");
" <input type=\"text\" name=\"search\" value=\"%s\" />\n"
" <input type=\"submit\" name=\"button\" value=\"Search\" />\n"
"</form>\n",
- script_name (), (term != NULL) ? term : "");
+ script_name (), (term_html != NULL) ? term_html : "");
+
+ free (term_html);
printf (" <ul>\n");
if (term == NULL)