char *result = (char *) PR_Malloc(PL_strlen(incomingURL)*3+1);
char *result = (char *) PR_Malloc(nsCRT::strlen(incomingURL)*3+1);
escape_unescaped_percents(const char *incomingURL){	const char *inC;	char *outC;	char *result = (char *) PR_Malloc(PL_strlen(incomingURL)*3+1);	if (result)	{		for(inC = incomingURL, outC = result; *inC != '\0'; inC++)		{			if (*inC == '%')			{				/* Check if either of the next two characters are non-hex. */				if ( !*(inC+1) || NONHEX(*(inC+1)) || !*(inC+2) || NONHEX(*(inC+2)) )				{					/* Hex characters don't follow, escape the 					   percent char */					*outC++ = '%'; *outC++ = '2'; *outC++ = '5';				}				else				{					/* Hex characters follow, so assume the percent 					   is escaping something else */					*outC++ = *inC;				}			}			else				*outC++ = *inC;		}		*outC = '\0';	}	return result;}