code: private String normalizeId(String stringToNormalize)
      {
          int len = stringToNormalize.length();
          int bufLen = len * 2;
          if (bufLen < 0) {
              bufLen = Integer.MAX_VALUE;
          }
  
          StringBuilder outBuffer = new StringBuilder(bufLen);
  
          for (int x = 0; x < len; x++) {
              char c = stringToNormalize.charAt(x);
  
              if (ALLOWED.get(c)) {
                  outBuffer.append(c);
              } else if (!Character.isWhitespace(c)) {
                  int nibble;
                  boolean skip = true;
  
                  nibble = (c >> 12) & 0xF;
                  if (nibble != 0) {
                      skip = false;
                      outBuffer.append(toHex(nibble));
                  }
  
                  nibble = (c >> 8) & 0xF;
                  if (!skip || nibble != 0) {
                      skip = false;
                      outBuffer.append(toHex(nibble));
                  }
  
                  nibble = (c >> 4) & 0xF;
                  if (!skip || nibble != 0) {
                      outBuffer.append(toHex(nibble));
                  }
  
                  outBuffer.append(toHex(c & 0xF));
              }
          }
  
          return outBuffer.toString();
      }
docs: Normalize passed string into valid string.
  <ul>
  <li>Remove white spaces: Clean white space since otherwise they'll get transformed into 20 by the below and thus
  for "Hello world" we would get "Hello20world" for the id. It's nicer to get "Helloworld".</li>
  <li>Convert all non allowed characters. See {@link #ALLOWED} for allowed characters.</li>
  </ul>
  
  @param stringToNormalize the string to normalize
  @return the normalized string