]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
merge this from 2.1-dev:
authorJeff Trawick <trawick@apache.org>
Thu, 4 Dec 2003 06:46:27 +0000 (06:46 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 4 Dec 2003 06:46:27 +0000 (06:46 +0000)
    mod_info: Escape html code in directives and arguments. PR: 24232

PR:              24232
Submitted by:  thommay
Reviewed by:  nd, trawick, striker

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@101981 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/generators/mod_info.c

diff --git a/CHANGES b/CHANGES
index 5a0eef55abc4e5d57cbcbc268e9f9b10057aef5b..5ac626b37a4637a664529951d5d7e11fb10c12be 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.49
 
+  *) mod_info: HTML escape configuration information so it displays 
+     correctly. PR 24232. [Thom May]
+     
   *) Restore the ability to add a description for directories that
      don't contain an index file.  (Broken in 2.0.48) [AndrĂ© Malo]
 
diff --git a/STATUS b/STATUS
index 34d93d451dcc1f4c8924efb1455db008dba91d4a..f4e6d34be118af19be62b4e5f29aa4f028bf76ad 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2003/12/04 06:40:13 $]
+Last modified at [$Date: 2003/12/04 06:46:26 $]
 
 Release:
 
@@ -317,10 +317,6 @@ PATCHES TO BACKPORT FROM 2.1
        (nd: +1 on concept, lacking knowledge prevents me from definitely +1'ing
             it.)
 
-    * mod_info: Escape html code in directives and arguments. PR: 24232
-        modules/generators/mod_info.c: r1.52
-      +1: thommay, nd, trawick, striker
-
     * Let mod_autoindex show filenames containing special characters.
       PR 13598.
         server/request.c: r1.130
index 9dffaf5b08791da03e10a86d092cde8b2a59192a..888cb1383f34f7167bef0d0c17b66bb4726a9405 100644 (file)
@@ -181,7 +181,7 @@ static void mod_info_module_cmds(request_rec * r, const command_rec * cmds,
                if (nest > block_start) {
                    block_start++;
                    apr_snprintf(htmlstring, sizeof(htmlstring), "%s %s",
-                               tmptree->parent->directive,
+                                tmptree->parent->directive,
                                tmptree->parent->args);
                     ap_rputs("<dd><tt>", r);
                     mod_info_html_cmd_string(r, htmlstring, 0);
@@ -190,15 +190,18 @@ static void mod_info_module_cmds(request_rec * r, const command_rec * cmds,
                if (nest == 2) {
                    ap_rprintf(r, "<dd><tt>&nbsp;&nbsp;&nbsp;&nbsp;%s "
                               "<i>%s</i></tt></dd>\n",
-                              tmptree->directive, tmptree->args);
+                               ap_escape_html(r->pool,tmptree->directive), 
+                               ap_escape_html(r->pool,tmptree->args));
                } else if (nest == 1) {
                    ap_rprintf(r,
                               "<dd><tt>&nbsp;&nbsp;%s <i>%s</i></tt></dd>\n",
-                              tmptree->directive, tmptree->args);
+                               ap_escape_html(r->pool,tmptree->directive), 
+                               ap_escape_html(r->pool,tmptree->args));
                } else {
                     ap_rputs("<dd><tt>", r);
                     mod_info_html_cmd_string(r, tmptree->directive, 0);
-                    ap_rprintf(r, " <i>%s</i></tt></dd>\n", tmptree->args);
+                    ap_rprintf(r, " <i>%s</i></tt></dd>\n", 
+                               ap_escape_html(r->pool,tmptree->args));
                }
            }
            ++cmd;