Normalizes the request data.
This method strips off slashes in request data if get_magic_quotes_gpc() returns true.
325132
protected function normalizeRequest()
    {
        // normalize request
        if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
            if (isset($_GET))
                $_GET = $this->stripSlashes($_GET);
            if (isset($_POST))
                $_POST = $this->stripSlashes($_POST);
            if (isset($_REQUEST))
                $_REQUEST = $this->stripSlashes($_REQUEST);
            if (isset($_COOKIE))
                $_COOKIE = $this->stripSlashes($_COOKIE);
        }
    }
468637
function sanitizeFormValue($str) {
	    $str = trim($str);
	    if(get_magic_quotes_gpc()) {
		    $str = stripslashes($str);
	    }
	    return $this->connection->real_escape_string($str);
	}
731706
def normalize(url, strip=False):
    ""
    if strip:
        p = _urltools.parse(url)
        url = p.scheme + '://' + p.subdomain + p.domain + p.path
    return _urltools.normalize(url)
362627
def normalize(pw):
    
    pw_lower = pw.lower()
    return ''.join(helper.L33T.get(c, c) for c in pw_lower)
837731
function normalize(argumts, offset, chaining) {
  var args;

  if (argumts.length > 0) {
    args = slice(argumts, offset);
  } else {
    return undefined;
  }

  // data is always sent as a list
  if (args.length === 1) {
    if (chaining || (Array.isArray(args[0]) && args[0].length > 0)) {
      return args[0];
    } else {
      return [args[0]];
    }
  } else {
    return args;
  }
}
48279
public String normalizeUri(String uri, boolean isWindows)
    throws IOException
  {
    CharBuffer cb = new CharBuffer();

    int len = uri.length();

    if (_maxURILength < len)
      throw new BadRequestException(L.l("The request contains an illegal URL because it is too long."));

    char ch;
    if (len == 0 || (ch = uri.charAt(0)) != '/' && ch != '\\')
      cb.append('/');

    for (int i = 0; i < len; i++) {
      ch = uri.charAt(i);

      if (ch == '/' || ch == '\\') {
      dots:
        while (i + 1 < len) {
          ch = uri.charAt(i + 1);

          if (ch == '/' || ch == '\\')
            i++;
          else if (ch != '.')
            break dots;
          else if (len <= i + 2
                   || (ch = uri.charAt(i + 2)) == '/' || ch == '\\') {
            i += 2;
          }
          else if (ch != '.')
            break dots;
          else if (len <= i + 3
                   || (ch = uri.charAt(i + 3)) == '/' || ch == '\\') {
            int j;

            for (j = cb.length() - 1; j >= 0; j--) {
              if ((ch = cb.charAt(j)) == '/' || ch == '\\')
                break;
            }
            if (j > 0)
              cb.length(j);
            else
              cb.length(0);
            i += 3;
          } else {
            throw new BadRequestException(L.l("The request contains an illegal URL."));
          }
        }

        while (isWindows && cb.length() > 0
               && ((ch = cb.lastChar()) == '.' || ch == ' ')) {
          cb.length(cb.length() - 1);

          if (cb.length() > 0
              && (ch = cb.lastChar()) == '/' || ch == '\\') {
            cb.length(cb.length() - 1);
            // server/003n
            continue;
          }
        }

        cb.append('/');
      }
      else if (ch == 0)
        throw new BadRequestException(L.l("The request contains an illegal URL."));
      else
        cb.append(ch);
    }

    while (isWindows && cb.length() > 0
           && ((ch = cb.lastChar()) == '.' || ch == ' ')) {
      cb.length(cb.length() - 1);
    }

    return cb.toString();
  }
934170
protected function normalize()
	{
		// Decode all entities to their simpler forms
		$this->container['filename'] = html_entity_decode($this->container['filename'], ENT_QUOTES, 'UTF-8');

		// Remove all quotes
		$this->container['filename'] = preg_replace("#[\"\']#", '', $this->container['filename']);

		// Strip unwanted characters
		$this->container['filename'] = preg_replace("#[^a-z0-9]#i", $this->config['normalize_separator'], $this->container['filename']);
		$this->container['filename'] = preg_replace("#[/_|+ -]+#u", $this->config['normalize_separator'], $this->container['filename']);
		$this->container['filename'] = trim($this->container['filename'], $this->config['normalize_separator']);
	}
169299
def normalize_parameters(params):
        
        params = params or {}
        normalized_parameters = OrderedDict()

        def get_value_like_as_php(val):
            """ Prepare value for quote """
            try:
                base = basestring
            except NameError:
                base = (str, bytes)

            if isinstance(val, base):
                return val
            elif isinstance(val, bool):
                return "1" if val else ""
            elif isinstance(val, int):
                return str(val)
            elif isinstance(val, float):
                return str(int(val)) if val % 1 == 0 else str(val)
            else:
                return ""

        for key, value in params.items():
            value = get_value_like_as_php(value)
            key = quote(unquote(str(key))).replace("%", "%25")
            value = quote(unquote(str(value))).replace("%", "%25")
            normalized_parameters[key] = value

        return normalized_parameters
1013877
def normalize_uri(self, uri):
        """"""
        return urllib.quote(
            re.sub(r"\s", '+', uri.strip().lower()),
            safe = '~@#$&()*!+=:),.?/\'')
909657
function normalize (val, safe) {
    return (
      val == null ? ''
      : val === false ? ''
      : Array.isArray(val) ? val.map(normalize).join('')
      : safe === false ? $.escapeHTML(val)
      : String(val)
    )
  }
955597
public void normalize() {
		if (llx > urx) {
			float a = llx;
			llx = urx;
			urx = a;
		}
		if (lly > ury) {
			float a = lly;
			lly = ury;
			ury = a;
		}
	}
529789
static public String normalize(byte[] data, int format) {

        if (null == data) {
            return null;
        }
        if (0 == data.length) {
            return "";
        }
        // if normalization is off, just return
        if (NORMALIZE_OFF == format) {
            return new String(data);
        }

        char[] buf = new char[data.length];
        for (int index = 0; index < data.length; index++) {
            buf[index] = normalize((char) data[index], format);
        }

        return new String(buf, 0, buf.length);
    }
356580
def _normalize_query(self, query):
        

        for k, v in query.items():
            if isinstance(v, list):
                query[k] = ','.join([str(e) for e in v])
309217
def normalize_str(string):
    
    if string:
        if not isinstance(string, str):
            string = str(string, 'utf-8', 'replace')

        string = string.encode('utf-8')
        return normalize(
            'NFKD', string.decode('utf-8')).encode('ASCII', 'ignore').decode()
    return ''
41148
def normalize_result(result, default, threshold=0.2):
    """"""
    if result is None:
        return default
    if result.get('confidence') is None:
        return default
    if result.get('confidence') < threshold:
        return default
    return normalize_encoding(result.get('encoding'),
                              default=default)
911418
def normalize_with_encoded_query
      normalize_without_encoded_query.tap do |uri|
        if uri.query_values.present?
          uri.query_values = uri.query_values.map { |key, value| [key, value] }
        end
        uri
      end
    end
1170081
def normalize_val(self, value=_nothing):
        
        if isinstance(value, basestring):
            value = self.normalize_text(value)
        if self.ignore_empty_slots and self.value_is_empty(value):
            value = _nothing
        return value