src/main/java/com/github/ricksbrown/cowsay/Cowsay.java
private static String formatHtml(final CommandLine commandLine, final String plainCow, final String moosage,
									 final boolean isThought) {
		String cow = plainCow;
		if (commandLine.hasOption(CowsayCli.Opt.HTML.toString())) {
			cow = StringEscapeUtils.escapeHtml4(cow);
			cow = "<figure><pre>" + cow + "</pre><figcaption style=\"left:-999px; position:absolute\">";
			String alt;
			if (commandLine.hasOption(CowsayCli.Opt.ALT.toString())) {
				alt = commandLine.getOptionValue(CowsayCli.Opt.ALT.toString());
			}
			else {
				alt = isThought ? I18n.getMessage("altthink") : I18n.getMessage("altsay");

			}
			String escaped = StringEscapeUtils.escapeHtml4(moosage);
			cow += String.format(alt, escaped);
			cow += "</figcaption></figure>";
		}
		return cow;
	}
private static String formatHtml(final CommandLine commandLine, final String plainCow, final String moosage,
									 final boolean isThought) {
		String cow = plainCow;
		if (commandLine.hasOption(CowsayCli.Opt.HTML.toString())) {
			cow = StringEscapeUtils.escapeHtml4(cow);
			cow = "<figure><pre>" + cow + "</pre><figcaption style=\"left:-999px; position:absolute\">";
			String alt;
			if (commandLine.hasOption(CowsayCli.Opt.ALT.toString())) {
				alt = commandLine.getOptionValue(CowsayCli.Opt.ALT.toString());
			}
			else {
				alt = isThought ? I18n.getMessage("altthink") : I18n.getMessage("altsay");

			}
			String escaped = StringEscapeUtils.escapeHtml4(moosage);
			cow += String.format(alt, escaped);
			cow += "</figcaption></figure>";
		}
		return cow;
	}
May apply HTML markup to the cow, if requested in the command line.
@param commandLine The command line with user options.
@param plainCow The cow formatted in plain text.
@param moosage The message the cow is saying.
@param isThought true if this is cowthink instead of cowsay.
@return Either the plaintext cow or an HTML marked up version, depending on command line.