[GRASS-SVN] r32842 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 17 14:36:47 EDT 2008
Author: glynn
Date: 2008-08-17 14:36:47 -0400 (Sun, 17 Aug 2008)
New Revision: 32842
Modified:
grass/trunk/lib/gis/parser.c
Log:
Make more effort to escape < > & in HTML
Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c 2008-08-17 18:35:38 UTC (rev 32841)
+++ grass/trunk/lib/gis/parser.c 2008-08-17 18:36:47 UTC (rev 32842)
@@ -1649,7 +1649,7 @@
if (opt->label) {
fprintf(stdout, "<DD>");
- fprintf(stdout, "%s", opt->label);
+ print_escaped_for_html(stdout, opt->label);
fprintf(stdout, "</DD>\n");
}
if (opt->description) {
@@ -1660,13 +1660,13 @@
if (opt->options) {
fprintf(stdout, "<DD>%s: <em>", _("Options"));
- fprintf(stdout, "%s", opt->options);
+ print_escaped_for_html(stdout, opt->options);
fprintf(stdout, "</em></DD>\n");
}
if (opt->def) {
fprintf(stdout, "<DD>%s: <em>", _("Default"));
- fprintf(stdout, "%s", opt->def);
+ print_escaped_for_html(stdout, opt->def);
fprintf(stdout, "</em></DD>\n");
}
@@ -1674,9 +1674,13 @@
int i = 0;
while (opt->opts[i]) {
- if (opt->descs[i])
- fprintf(stdout, "<DD><b>%s</b>: %s</DD>\n",
- opt->opts[i], opt->descs[i]);
+ if (opt->descs[i]) {
+ fprintf(stdout, "<DD><b>");
+ print_escaped_for_html(stdout, opt->opts[i]);
+ fprintf(stdout, "</b>: ");
+ print_escaped_for_html(stdout, opt->descs[i]);
+ fprintf(stdout, "</DD>\n");
+ }
i++;
}
}
More information about the grass-commit
mailing list