code: public static CharSequence escapeMarkupId(final CharSequence markupId) {
          Args.notNull(markupId, "markupId");
  
          // create pattern for: !"#$%&'()*+,./:;<=>?@[\]^`{|}~
          final StringCharacterIterator iterator = new StringCharacterIterator(markupId.toString());
          final StringBuilder result = new StringBuilder((int) (markupId.length() * 1.5));
          final String escape = "\\\\";
  
          char c = iterator.current();
          while (c != CharacterIterator.DONE) {
              boolean escaped = false;
              for (char x : ESCAPE_CHARS) {
                  if (x == c) {
                      result.append(escape).append(c);
                      escaped = true;
                      break;
                  }
              }
  
              if (!escaped) {
                  result.append(c);
              }
  
              c = iterator.next();
          }
  
          return result.toString();
      }
docs: Returns a markup id that is JQuery-safe and could be used as a selector.
  
  @param markupId the markup id to escape
  @return the component's markup id that is escaped so that it could be used as JQuery selector