summaryrefslogtreecommitdiff
path: root/ext/standard/url_scanner_ex.re
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2002-03-26 10:23:33 +0000
committerSascha Schumann <sas@php.net>2002-03-26 10:23:33 +0000
commit5428e463bd75ff74a28deb7164f8bddbe8cc01cb (patch)
treec39f59e74bd59112e41dfa3e3f8136eae5584393 /ext/standard/url_scanner_ex.re
parentec0c373992e68a892ce1d74baffee00a09ed96e9 (diff)
downloadphp-git-5428e463bd75ff74a28deb7164f8bddbe8cc01cb.tar.gz
If an argument (<tag val=argument..) was not quoted, leave it that way.
Diffstat (limited to 'ext/standard/url_scanner_ex.re')
-rw-r--r--ext/standard/url_scanner_ex.re10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re
index 620480a934..4d7c507894 100644
--- a/ext/standard/url_scanner_ex.re
+++ b/ext/standard/url_scanner_ex.re
@@ -140,20 +140,22 @@ done:
#undef YYLIMIT
#undef YYMARKER
-static inline void tag_arg(url_adapt_state_ex_t *ctx, char quote TSRMLS_DC)
+static inline void tag_arg(url_adapt_state_ex_t *ctx, char quotes, char type TSRMLS_DC)
{
char f = 0;
if (strncasecmp(ctx->arg.c, ctx->lookup_data, ctx->arg.len) == 0)
f = 1;
- smart_str_appendc(&ctx->result, quote);
+ if (quotes)
+ smart_str_appendc(&ctx->result, type);
if (f) {
append_modified_url(&ctx->val, &ctx->result, &ctx->q_name, &ctx->q_value, PG(arg_separator).output);
} else {
smart_str_append(&ctx->result, &ctx->val);
}
- smart_str_appendc(&ctx->result, quote);
+ if (quotes)
+ smart_str_appendc(&ctx->result, type);
}
enum {
@@ -221,7 +223,7 @@ static inline void handle_arg(STD_PARA)
static inline void handle_val(STD_PARA, char quotes, char type)
{
smart_str_setl(&ctx->val, start + quotes, YYCURSOR - start - quotes * 2);
- tag_arg(ctx, type TSRMLS_CC);
+ tag_arg(ctx, quotes, type TSRMLS_CC);
}
#ifdef SCANNER_DEBUG