code: public static String encodeParameter(String input) {
  
          String result = CmsEncoder.encodeHtmlEntities(input, CmsEncoder.ENCODING_US_ASCII);
          result = CmsStringUtil.substitute(result, "+", PLUS_ENTITY);
          return CmsStringUtil.substitute(result, ENTITY_PREFIX, ENTITY_REPLACEMENT);
      }
docs: Encodes a string used as parameter in an uri in a way independent of other encodings/decodings applied later.<p>
  
  Used to ensure that GET parameters are not wrecked by wrong or incompatible configuration settings.
  In order to ensure this, the String is first encoded with html entities for any character that cannot encoded
  in US-ASCII; additionally, the plus sign is also encoded to avoid problems with the white-space replacer.
  Finally, the entity prefix is replaced with characters not used as delimiters in urls.<p>
  
  @param input the parameter string
  
  @return the encoded parameter string