php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12252 URL rewriter outputs a spurious " /"
Submitted: 2001-07-19 09:29 UTC Modified: 2001-07-19 10:40 UTC
From: dans at free dot fr Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.6 OS: linux suse 6.4
Private report: No CVE-ID: None
 [2001-07-19 09:29 UTC] dans at free dot fr
the rewriter adds a " /" befor the closing bracket in the <form> rewriting.
fallowing a diff to patch it.
sincerely Daniel S.

*** ext/standard/url_scanner_ex.c       Thu Jun 21 08:29:04 2001
--- ext/standard/url_scanner_ex_modif.c   Thu Jul 19 14:14:34 2001
*************** static inline void handle_form(STD_PARA)
*** 178,182 ****
                smart_str_appends(&ctx->result, "\" value=\"");
                smart_str_append(&ctx->result, &ctx->q_value);
!               smart_str_appends(&ctx->result, "\" />");
        }
  }
--- 178,182 ----
                smart_str_appends(&ctx->result, "\" value=\"");
                smart_str_append(&ctx->result, &ctx->q_value);
!               smart_str_appends(&ctx->result, "\">");
        }
  }

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-19 10:08 UTC] swm@php.net
This is not a spurious slash. This slash is present to make PHP XHTML 1.0 compliant. See more at: http://www.w3.org/TR/xhtml1/

swm
 [2001-07-19 10:34 UTC] cynic@php.net
actually that _is_ a bug. form is _not_ an empty element.
 [2001-07-19 10:37 UTC] swm@php.net
I don't think it is. Here is the code:

static inline void handle_form(STD_PARA)
{
    if (ctx->tag.len == 4 && strncasecmp(ctx->tag.c, "form", 4) == 0) {
        smart_str_appends(&ctx->result, "<input type=\"hidden\" name=\"");
        smart_str_append(&ctx->result, &ctx->q_name);
        smart_str_appends(&ctx->result, "\" value=\"");
        smart_str_append(&ctx->result, &ctx->q_value);
        smart_str_appends(&ctx->result, "\" />");
    }
}

You'll notice that it is not a <form> tag we are adding.
Rather, it is <input/>
 [2001-07-19 10:40 UTC] swm@php.net
Now closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 07:01:31 2024 UTC