diff options
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r-- | WWW/Library/Implementation/HTString.c | 10 | ||||
-rw-r--r-- | WWW/Library/Implementation/SGML.c | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c index 89160f16..c57d51c4 100644 --- a/WWW/Library/Implementation/HTString.c +++ b/WWW/Library/Implementation/HTString.c @@ -864,10 +864,14 @@ PUBLIC char *HTQuoteParameter ARGS1( result[n++] = parameter[i]; result[n++] = D_QUOTE; result[n++] = S_QUOTE; - } else if (parameter[i] == '\\') { - result[n++] = parameter[i]; - result[n++] = parameter[i]; } else { + /* Note: No special handling of other characters, including + backslash, since we are constructing a single-quoted string! + Backslash has no special escape meaning within those for sh + and compatible shells, so trying to escape a backslash by + doubling it is unnecessary and would be interpreted by the + shell as an additional data character. - kw 2000-05-02 + */ result[n++] = parameter[i]; } } diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index e6f0fab7..efa921dc 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -2163,7 +2163,8 @@ top1: /* ** If complete match, end litteral. */ - if ((c == '>') && testtag && !testtag->name[string->size-2]) { + if ((c == '>') && testtag && + string->size > 1 && !testtag->name[string->size-2]) { #ifdef USE_PRETTYSRC if (psrc_view) { PSRCSTART(abracket);PUTC('<');PUTC('/');PSRCSTOP(abracket); |