JAL-908,JAL-701 - patch applet to strip HTML tags from HTML annotation description
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 19 Aug 2011 10:05:09 +0000 (11:05 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 19 Aug 2011 10:05:09 +0000 (11:05 +0100)
src/jalview/appletgui/AnnotationLabels.java

index 1a6400d..e383e9d 100755 (executable)
@@ -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)