code: private String extractIdUnescaped(String id) {
          if (!id.isEmpty() && !Character.isDigit(id.charAt(0))) {
              return org.unbescape.css.CssEscape.unescapeCss(id);
          }
          return null;
      }
docs: check if string is valid ID
  
  @param id ID to validate and unescapes
  @return unescaped id or null