X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FSequenceAnnotationReport.java;h=6d819d39a88092a7f285d0e954e583bf82292db6;hb=705d1c84c9a03bb0378593e4d8d8a90c8a11f831;hp=13f41d4ccba86afe65e154e87769b3a9b3bb8e10;hpb=329b71c12ee91c57d83df128e6447d6ef0583b17;p=jalview.git diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index 13f41d4..6d819d3 100644 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@ -26,6 +26,7 @@ import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.io.gff.GffConstants; import jalview.util.MessageManager; +import jalview.util.StringUtils; import jalview.util.UrlLink; import java.util.Arrays; @@ -183,50 +184,11 @@ public class SequenceAnnotationReport sb.append(" ").append(feature.end); } - if (feature.getDescription() != null - && !feature.description.equals(feature.getType())) + String description = feature.getDescription(); + if (description != null && !description.equals(feature.getType())) { - String tmpString = feature.getDescription(); - String tmp2up = tmpString.toUpperCase(); - int startTag = tmp2up.indexOf(""); - if (startTag > -1) - { - tmpString = tmpString.substring(startTag + 6); - tmp2up = tmp2up.substring(startTag + 6); - } - int endTag = tmp2up.indexOf(""); - if (endTag > -1) - { - tmpString = tmpString.substring(0, endTag); - tmp2up = tmp2up.substring(0, endTag); - } - endTag = tmp2up.indexOf(""); - if (endTag > -1) - { - tmpString = tmpString.substring(0, endTag); - } - - if (startTag > -1) - { - sb.append("; ").append(tmpString); - } - else - { - if (tmpString.indexOf("<") > -1 || tmpString.indexOf(">") > -1) - { - // The description does not specify html is to - // be used, so we must remove < > symbols - tmpString = tmpString.replaceAll("<", "<"); - tmpString = tmpString.replaceAll(">", ">"); - - sb.append("; "); - sb.append(tmpString); - } - else - { - sb.append("; ").append(tmpString); - } - } + description = StringUtils.stripHtmlTags(description); + sb.append("; ").append(description); } // check score should be shown if (!Float.isNaN(feature.getScore()))