From 2e5393f81c78a3bb60a99f6e7eaa075d993c8eaa Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 19 Aug 2011 11:05:09 +0100 Subject: [PATCH 1/1] JAL-908,JAL-701 - patch applet to strip HTML tags from HTML annotation description --- src/jalview/appletgui/AnnotationLabels.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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) -- 1.7.10.2