Checks if there are any GET vars in the URL, adds these to object
vars and removes from URL.
965354
private function parseCgiParameters() {
		
		if (FALSE===strpos($this->url, '?')) {
			return;
		}
			
		$temp = explode('?', $this->url);
		$this->url = $temp[0];
		
		if (!array_key_exists(1, $temp)) {
			return;
		}
			
		// adds to $this->params
		$couples = explode('&', $temp[1]);
		
		foreach ($couples as $c) {
			
			$var = explode('=', $c);
			
			if (array_key_exists(1, $var)) {
				list ($key, $value) = $var;
				$this->setParam($key, $value);
			}
			
		}
		
	}
292349
def clean_url(url, force_scheme=None):
    """"""
    # URL should be ASCII according to RFC 3986
    url = str(url)
    # Collapse ../../ and related
    url_parts = urlparse.urlparse(url)
    path_parts = []
    for part in url_parts.path.split('/'):
        if part == '.':
            continue
        elif part == '..':
            if path_parts:
                path_parts.pop()
        else:
            path_parts.append(part)

    url_parts = list(url_parts)
    if force_scheme:
        url_parts[0] = force_scheme
    url_parts[2] = '/'.join(path_parts)

    if FLAGS.keep_query_string == False:
        url_parts[4] = ''    # No query string

    url_parts[5] = ''    # No path

    # Always have a trailing slash
    if not url_parts[2]:
        url_parts[2] = '/'

    return urlparse.urlunparse(url_parts)
843628
def clean_url(url, base_url=None):
    """"""
    parsed_url = urlparse(url)

    fragment = '{url.fragment}'.format(url=parsed_url)
    if fragment:
        url = url.split(fragment)[0]

    # Identify internal URLs and fix their format
    netloc = '{url.netloc}'.format(url=parsed_url)
    if base_url is not None and not netloc:
        parsed_base = urlparse(base_url)
        split_base = '{url.scheme}://{url.netloc}{url.path}/'.format(url=parsed_base)
        url = urljoin(split_base, url)
        netloc = '{url.netloc}'.format(url=urlparse(url))

    if 'www.' in netloc:
        url = url.replace(netloc, netloc.replace('www.', ''))
    return url.rstrip(string.punctuation)
383385
protected static String cleanupUrl(final String url) {
        if (url == null) {
            return null;
        }
        val jsessionPosition = url.indexOf(";jsession");
        if (jsessionPosition == -1) {
            return url;
        }
        val questionMarkPosition = url.indexOf('?');
        if (questionMarkPosition < jsessionPosition) {
            return url.substring(0, url.indexOf(";jsession"));
        }
        return url.substring(0, jsessionPosition) + url.substring(questionMarkPosition);
    }
106655
function destroyLocalVariablesList()
    {
        array_pop( $this->LocalVariablesNamesStack );

        if ( $this->LocalVariablesNamesStack )
            $this->CurrentLocalVariablesNames =& $this->LocalVariablesNamesStack[ count( $this->LocalVariablesNamesStack ) - 1];
        else
            unset( $this->CurrentLocalVariablesNames );
    }
75365
def _clean_item(self, request_url):
        
        del self._table[request_url]
        self._usage_recency.remove(request_url)
1124271
function (urls) {

            if (this._typeUtils.isString(urls)) {
                urls = [urls];
            }

            var _getPackages = function (urls, urlMap, packages) {
                if (urls.length === 0) {
                    // everything has been found, leave back the recursive loop
                    return;
                }
                for (var key in urlMap) {
                    var value = urlMap[key];
                    if (typeof(value) == 'string') {
                        value = "/" + value;
                        // Check if something match
                        for (var i = 0, ii = urls.length; i < ii; i++) {
                            var file = urls[i];
                            if (value.substr(0, file.length) == file) {
                                packages[value] = true;
                                // remove found item from the url list, for performance reason
                                urls.slice(i, i);
                                break;
                            }
                        }
                    } else {
                        _getPackages(urls, urlMap[key], packages);
                    }
                }
            };

            // Clone urls array
            var urlClone = [];
            for (var i = 0, ii = urls.length; i < ii; i++) {
                urlClone.push(urls[i]);
            }

            var packages = {};
            _getPackages(urls, this._urlMap, packages);

            // return the keys only
            var keys = [];
            for (var key in packages) {
                keys.push(key);
            }
            return keys;
        }
1025273
def clean_url(url):
    
    parsed = urlparse(url.strip())
    reconstructed = ParseResult(
        parsed.scheme, parsed.netloc, parsed.path,
        params='', query='', fragment='')
    return reconstructed.geturl()
1204932
function cleanup()
    {
        // destroy loop variable(s)
        foreach ( $this->LoopVariablesNames as $varName )
            $this->Tpl->unsetVariable( $varName, $this->RootNamespace );
    }
1339242
def delete(url, options = {})
      connection(url, options) do |uri, conn|
        conn.delete(uri.request_uri, options)
      end
    end
319287
def delete(url, options={}, &block)
      http_options = options.merge(@basic_options)
      if block_given?
        RestClient.delete(url, http_options, &block)
      else
        RestClient.delete(url, http_options)
      end
    end
49182
function(url) {
			var linkEls = moduleEl.querySelectorAll('a');

			for (var i = 0, len = linkEls.length; i < len; i++) {
				if (url === linkEls[i].pathname) {
					linkEls[i].classList.add('selected');
				} else {
					linkEls[i].classList.remove('selected');
				}
			}
		}
1111349
private Set<URL> filterURLs(final Set<URL> urls) {
		final Set<URL> results = new HashSet<URL>(urls.size());
		for (final URL url : urls) {
			String cleanURL = url.toString();
			// Fix JBoss URLs
			if (url.getProtocol().startsWith("vfszip:")) {
				cleanURL = cleanURL.replaceFirst("vfszip:", "file:");
			} else if (url.getProtocol().startsWith("vfsfile:")) {
				cleanURL = cleanURL.replaceFirst("vfsfile:", "file:");
			}
			cleanURL = cleanURL.replaceFirst("\\.jar/", ".jar!/");
			try {
				results.add(new URL(cleanURL));
			} catch (final MalformedURLException ex) {
				// Shouldn't happen, but we can't do more to fix this URL.
			}
		}
		return results;
	}
662537
public function resetRequestVariables()
    {
        $_SERVER = $this->requestCache['_SERVER'];
        $_POST = $this->requestCache['_POST'];
        $_GET = $this->requestCache['_GET'];
        $_SESSION = $this->requestCache['_SESSION'];
        $_COOKIE = $this->requestCache['_COOKIE'];
    }
1070305
private static function RemoveUndefinedVars(){
            $oThis = self::CreateInstanceIfNotExists();
            $iOffset = 0;

            while(preg_match('/{\$(.*?)}/i', $oThis->sBuffer, $aMatches, PREG_OFFSET_CAPTURE, $iOffset)){
                $oThis->sBuffer = str_replace($aMatches[0][0], "false", $oThis->sBuffer);
                $iOffset = $aMatches[0][1]+strlen($aMatches[0][0]);
            }
        }
678240
def url(self, var, default=NOTSET):
        
        return self.get_value(var, cast=urlparse, default=default, parse_default=True)
1271125
def filter_url(url, **kwargs):
    """"""

    d = parse_url_to_dict(url)

    d.update(kwargs)

    return unparse_url_dict({k: v for k, v in list(d.items()) if v})