If JOptionPane's message content both linefeed/cursor return and HTML tag, "</html\>" will be shown in the JOptionPane dialog box because after every new line it creates a new messageComponent so the characters after the newline ie html tag will be considered as a new JLabel string and displayed. Fix is to ignore closing html tag if appearing after newline from the displayed string.
------------- Commit messages: - Fix - 5074006: Swing JOptionPane shows <html> tag as a string after newline Changes: https://git.openjdk.org/jdk/pull/10081/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10081&range=00 Issue: https://bugs.openjdk.org/browse/JDK-5074006 Stats: 74 lines in 2 files changed: 71 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/10081.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10081/head:pull/10081 PR: https://git.openjdk.org/jdk/pull/10081
