Here you can find the source of normalize(final String taintedURL)
public static String normalize(final String taintedURL)
//package com.java2s; //License from project: Apache License public class Main { private static final String SPACES = " "; private static final String CODES = "%([abcdef]|\\d){2,2}"; private static final String SPECIAL_CHARS = "[\\/?!:\\[\\]`.,()*\"';{}+=<>~\\$|#]"; private static final String DASH = "-"; private static final String EMPTY = ""; public static String normalize(final String taintedURL) { return taintedURL.trim() .replaceAll(SPACES, DASH) .replaceAll(CODES, EMPTY) .replaceAll(SPECIAL_CHARS, EMPTY).toLowerCase(); }// ww w . j a va 2s . com }