code: protected void cleanContentExtraWhiteSpaces()
      {
          if (getContent().length() > 0) {
              if (shouldRemoveWhiteSpaces()) {
                  Matcher matcher = HTML_WHITESPACE_DUPLICATES_PATTERN
                      .matcher(getContent());
                  String result = matcher.replaceAll(" ");
                  getContent().setLength(0);
                  getContent().append(result);
              }
          }
      }
docs: UC3: Replace group of white spaces by a single space.