Fix tooltip for cards with apostrophes. If there are cards with quotes

or lt/gt in the name, this will need more generic approach.
This commit is contained in:
rkfg 2016-03-04 21:20:39 +03:00
parent 20e7130bb1
commit 75324f778e

View file

@ -119,7 +119,7 @@ public class ColorPane extends JEditorPane {
public void append(String text) {
try {
text = text.replaceAll("(<font color=[^>]*>([^<]*)) (\\[[0-9a-fA-F]*\\])</font>", "<a href='#$2'>$1</a> $3");
text = text.replaceAll("(<font color=[^>]*>([^<]*)) (\\[[0-9a-fA-F]*\\])</font>", "<a href=\"#$2\">$1</a> $3");
setEditable(true);
kit.insertHTML(doc, doc.getLength(), text, 0, 0, null);
setEditable(false);