From: jprocter Date: Fri, 19 Aug 2011 10:05:09 +0000 (+0100) Subject: JAL-908,JAL-701 - patch applet to strip HTML tags from HTML annotation description X-Git-Tag: Release_2_7~92 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2e5393f81c78a3bb60a99f6e7eaa075d993c8eaa;p=jalview.git JAL-908,JAL-701 - patch applet to strip HTML tags from HTML annotation description --- diff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index 1a6400d..e383e9d 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -24,6 +24,7 @@ import java.awt.event.*; import java.awt.image.BufferedImage; import jalview.datamodel.*; +import jalview.util.ParseHtmlBodyAndLinks; public class AnnotationLabels extends Panel implements ActionListener, MouseListener, MouseMotionListener @@ -227,17 +228,14 @@ public class AnnotationLabels extends Panel implements ActionListener, if (row > -1) { + ParseHtmlBodyAndLinks phb = new ParseHtmlBodyAndLinks(av.alignment.getAlignmentAnnotation()[row].getDescription(true), true, "\n"); if (tooltip == null) { - tooltip = new Tooltip( - ap.av.alignment.getAlignmentAnnotation()[row] - .getDescription(true), - this); + tooltip = new Tooltip(phb.getNonHtmlContent(), this); } else { - tooltip.setTip(ap.av.alignment.getAlignmentAnnotation()[row] - .getDescription(true)); + tooltip.setTip(phb.getNonHtmlContent()); } } else if (tooltip != null)