if (nameAttrib.Length() <= 0)	continue;
if (nameAttrib.IsEmpty())	continue;
InternetSearchDataSource::GetInputs(const nsString &data, nsString &userVar,					const nsString &text, nsString &input){	nsAutoString	buffer(data);	nsresult	rv = NS_OK;	PRBool		inSection = PR_FALSE;	while(buffer.Length() > 0)	{		PRInt32 eol = buffer.FindCharInSet("\r\n", 0);		if (eol < 0)	break;		nsAutoString	line("");		if (eol > 0)		{			buffer.Left(line, eol);		}		buffer.Cut(0, eol+1);		if (line.Length() < 1)	continue;		// skip empty lines		if (line[0] == PRUnichar('#'))	continue;	// skip comments		line = line.Trim(" \t");		if (inSection == PR_FALSE)		{			if (line[0] != PRUnichar('<'))	continue;			line.Cut(0, 1);			inSection = PR_TRUE;		}		PRInt32	len = line.Length();		if (len > 0)		{			if (line[len-1] == PRUnichar('>'))			{				inSection = PR_FALSE;				line.SetLength(len-1);			}		}		if (inSection == PR_TRUE)	continue;		// look for inputs		if (line.Find("input", PR_TRUE) == 0)		{			line.Cut(0, 6);			line = line.Trim(" \t");						// first look for name attribute			nsAutoString	nameAttrib("");			PRInt32	nameOffset = line.Find("name", PR_TRUE);			if (nameOffset >= 0)			{				PRInt32 equal = line.FindChar(PRUnichar('='), PR_TRUE, nameOffset);				if (equal >= 0)				{					PRInt32	startQuote = line.FindChar(PRUnichar('\"'), PR_TRUE, equal + 1);					if (startQuote >= 0)					{						PRInt32	endQuote = line.FindChar(PRUnichar('\"'), PR_TRUE, startQuote + 1);						if (endQuote > 0)						{							line.Mid(nameAttrib, startQuote+1, endQuote-startQuote-1);						}					}					else					{						nameAttrib = line;						nameAttrib.Cut(0, equal+1);						nameAttrib = nameAttrib.Trim(" \t");						PRInt32 space = nameAttrib.FindCharInSet(" \t", 0);						if (space > 0)						{							nameAttrib.Truncate(space);						}					}				}			}			if (nameAttrib.Length() <= 0)	continue;			// first look for value attribute			nsAutoString	valueAttrib("");			PRInt32	valueOffset = line.Find("value", PR_TRUE);			if (valueOffset >= 0)			{				PRInt32 equal = line.FindChar(PRUnichar('='), PR_TRUE, valueOffset);				if (equal >= 0)				{					PRInt32	startQuote = line.FindChar(PRUnichar('\"'), PR_TRUE, equal + 1);					if (startQuote >= 0)					{						PRInt32	endQuote = line.FindChar(PRUnichar('\"'), PR_TRUE, startQuote + 1);						if (endQuote >= 0)						{							line.Mid(valueAttrib, startQuote+1, endQuote-startQuote-1);						}					}					else					{						// if value attribute's "value" isn't quoted, get the first word... ?						valueAttrib = line;						valueAttrib.Cut(0, equal+1);						valueAttrib = valueAttrib.Trim(" \t");						PRInt32 space = valueAttrib.FindCharInSet(" \t>", 0);						if (space > 0)						{							valueAttrib.Truncate(space);						}					}				}			}			else if (line.Find("user", PR_TRUE) >= 0)			{				userVar = nameAttrib;				valueAttrib = text;			}						// XXX should ignore if  mode=browser  is specified			// XXX need to do this better			if (line.RFind("mode=browser", PR_TRUE) >= 0)				continue;			if ((nameAttrib.Length() > 0) && (valueAttrib.Length() > 0))			{				if (input.Length() > 0)				{					input += "&";				}				input += nameAttrib;				input += "=";				input += valueAttrib;			}		}	}	return(rv);}