private String getHTML(String msg, Collection<Throwable> report) {

		// 
		// Usage question: The content herein will be escaped unless you call addHTMLContenet().
		//                 Further, clients can provide messages that contain HTML.  Is there a
		//                 use case where we want to show escaped HTML content?
		//
		//                 For now, I will assume no such use case exists, and allow HTML to go 
		//                 through.
		//
		//                 If no such use case exists, then we should update HTMLElement to 
		//                 not escape HTML.  If it does exist, then we should put the onus on
		//                 the client.
		//

		HTMLElement html = new HTMLElement("html");
		HTMLElement body = html.addElement("body");

		if (msg != null) {
			if (msg.startsWith(HTMLUtilities.HTML)) {
				// already HTML from the user
				body.addHTMLContent(msg);
			}
			else {
				String withBRs = addBR(msg);
				body./*addElement("h3").*/addHTMLContent(withBRs);
			}
		}

		for (Throwable t : report) {
			String tMsg = getMessage(t);

			if (SystemUtilities.isEqual(msg, tMsg)) {
				// Don't put the same message on twice.  Some clients call this dialog with
				// the message as simply Throwable.getMessage().
				continue;
			}

			String htmlTMsg = addBR(tMsg);
			body.addElement("p").addHTMLContent(htmlTMsg);
		}
		return html.toString();
	}
This spacer addresses the optical impression that the message panel changes size when showing details
Ghidra/Framework/Docking/src/main/java/docking/ErrLogExpandableDialog.java