docs: @Override
      public String encode( String text ) {
          if (text == null) return null;
          StringBuilder sb = new StringBuilder();
          CharacterIterator iter = new StringCharacterIterator(text);
          for (char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) {
              switch (c) {
                  case '&':
                      sb.append("&amp;");
                      break;
                  case '"':
                      sb.append("&quot;");
                      break;
                  case '<':
                      sb.append("&lt;");
                      break;
                  case '>':
                      sb.append("&gt;");
                      break;
                  case '\'':
                      sb.append("&#039;");
                      break;
                  default:
                      sb.append(c);
              }
          }
          return sb.toString();
      }