where the string being decoded doesn't have any ampersands
in it (e.g., because it's the value for an 'include virtual=...')
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92284
13f79535-47bb-0310-9956-
ffa450edef68
static void decodehtml(char *s)
{
int val, i, j;
- char *p = s;
+ char *p;
const char *ents;
static const char * const entlist[MAXENTLEN + 1] =
{
otilde\365oslash\370ugrave\371uacute\372yacute\375" /* 6 */
};
- for (; *s != '\0'; s++, p++) {
+ /* Do a fast scan through the string until we find anything
+ * that needs more complicated handling
+ */
+ for (; *s != '&'; s++) {
+ if (*s == '\0') {
+ return;
+ }
+ }
+
+ for (p = s; *s != '\0'; s++, p++) {
if (*s != '&') {
*p = *s;
continue;