	function doSearch(searchStr)
	{
		if (lastSearchStr == searchStr && isGetAll == lastGetAll) return;
		
		deselectTempCat();
		tempDlgContent.scrollTop = 0;
		diagramsTiles.innerHTML = '';
		diagramsListTitle.innerHTML = mxUtils.htmlEntities(mxResources.get('searchResults')) + 
										' "' + mxUtils.htmlEntities(searchStr) + '"';
		delayTimer = null;

		if (inTempScreen)
		{
			//Do search in templates
			filterTemplates(searchStr);
		}
		else if (searchDocsCallback)
		{
			if (searchStr)
			{
				spinner.spin(diagramsTiles);
				cancelPendingCall = false;
				callInitiated = true;
				//TODO use request id to allow only last request to show results
				searchDocsCallback(searchStr, extDiagramsCallback, function()
				{
					showError(mxResources.get('searchFailed'));
					extDiagramsCallback([]);
				}, isGetAll? null : username);
			}
			else
			{
				getRecentDocs(isGetAll); //Load recent doc again
			}
		}
		
		lastSearchStr = searchStr;
		lastGetAll = isGetAll;
	};
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.