git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3468 improvement to feature description truncation when <a> links in text
[jalview.git]
/
src
/
jalview
/
io
/
SequenceAnnotationReport.java
diff --git
a/src/jalview/io/SequenceAnnotationReport.java
b/src/jalview/io/SequenceAnnotationReport.java
index
1bbc338
..
3624cd9
100644
(file)
--- a/
src/jalview/io/SequenceAnnotationReport.java
+++ b/
src/jalview/io/SequenceAnnotationReport.java
@@
-242,7
+242,9
@@
public class SequenceAnnotationReport
* truncate overlong descriptions unless they contain an href
* (as truncation could leave corrupted html)
*/
* truncate overlong descriptions unless they contain an href
* (as truncation could leave corrupted html)
*/
- boolean hasLink = description.indexOf("a href") > -1;
+ int linkindex = description.toLowerCase().indexOf("<a ");
+ boolean hasLink = linkindex > -1
+ && linkindex < (MAX_DESCRIPTION_LENGTH);
if (description.length() > MAX_DESCRIPTION_LENGTH && !hasLink)
{
description = description.substring(0, MAX_DESCRIPTION_LENGTH)
if (description.length() > MAX_DESCRIPTION_LENGTH && !hasLink)
{
description = description.substring(0, MAX_DESCRIPTION_LENGTH)