docs: public void convertHTML(Reader input, Writer output, String startPattern, String endPattern, Hashtable properties) {
  
          /* local variables */
          StringBuffer htmlString = new StringBuffer();
          Node node;
          String outString = "";
  
          try {
              /* write InputStream input in StringBuffer htmlString */
              int c;
              while ((c = input.read()) != -1) {
                  htmlString.append((char)c);
              }
          } catch (IOException e) {
              if (CmsLog.INIT.isWarnEnabled()) {
                  CmsLog.INIT.warn(
                      Messages.get().getBundle().key(
                          Messages.LOG_HTMLIMPORT_CONVERSION_ERROR_0,
                          e.getLocalizedMessage()));
              }
              return;
          }
          outString = htmlString.toString();
          // extract from html if even both patterns are defined
          if (CmsStringUtil.isNotEmpty(startPattern) && CmsStringUtil.isNotEmpty(endPattern)) {
              String extractMain = extractHtml(outString, startPattern, endPattern);
              if (extractMain.length() != outString.length()) {
                  String extractHead = extractHtml(outString, "<html>", CmsStringUtil.BODY_START_REGEX);
                  //String extractHead = extractHtml(extractMain, "<html>", CmsStringUtil.C_BODY_START_REGEX);
                  StringBuffer buffer = new StringBuffer(extractHead.length() + extractMain.length() + 255);
                  buffer.append("<html>");
                  buffer.append(extractHead);
                  buffer.append("<body>");
                  buffer.append(extractMain);
                  buffer.append("</body></html>");
                  outString = buffer.toString();
              }
          }
  
          /* convert htmlString in InputStream for parseDOM */
          InputStream in;
          try {
              in = new ByteArrayInputStream(outString.getBytes(CmsEncoder.ENCODING_UTF_8));
          } catch (UnsupportedEncodingException e) {
              // this should never happen since UTF-8 is always supported
              in = new ByteArrayInputStream(outString.getBytes());
          }
          m_tidy.setInputEncoding(CmsEncoder.ENCODING_UTF_8);
          m_tidy.setOutputEncoding(CmsEncoder.ENCODING_UTF_8);
  
          // hold tidy error information into a new PrintWriter Object
          PrintWriter errorLog = new PrintWriter(new ByteArrayOutputStream(), true);
          m_tidy.setErrout(errorLog);
  
          node = m_tidy.parseDOM(in, null);
          /* check if html code has errors */
          if (m_tidy.getParseErrors() != 0) {
              if (CmsLog.INIT.isWarnEnabled()) {
                  CmsLog.INIT.warn(Messages.get().getBundle().key(Messages.LOG_HTMLIMPORT_CONVERSION_ERROR_0));
              }
          }
          /* second step: create transformed output with printDocument from DOM */
          printDocument(node, properties);
  
          try {
              String content = m_tempString.toString();
              content = CmsStringUtil.substitute(content, "<br></br>", "<br>");
              content = CmsStringUtil.substitutePerl(content, "</a>(\\w+)", "</a> $1", "g");
              output.write(content);
              output.close();
  
          } catch (IOException e) {
              if (CmsLog.INIT.isWarnEnabled()) {
                  CmsLog.INIT.warn(
                      Messages.get().getBundle().key(
                          Messages.LOG_HTMLIMPORT_CONVERSION_ERROR_1,
                          e.getLocalizedMessage()));
              }
              return;
          }
      }