Commit d0dc1c52 authored by Matija Obreza's avatar Matija Obreza

Merge branch '171-requesting-germplasm-jsp-error' into 'master'

Resolve "Requesting germplasm JSP error"

Closes #171

See merge request !78
parents 265b194d 6d240177
......@@ -16,6 +16,7 @@
package org.genesys2.server.service.impl;
import org.apache.commons.lang.StringUtils;
import org.genesys2.server.service.HtmlConverter;
import org.jsoup.Jsoup;
import org.jsoup.helper.StringUtil;
......@@ -43,6 +44,9 @@ public class JsoupHtmlConverter implements HtmlConverter {
@Override
@Cacheable(value = "htmltotextcache", key = "#html", unless = "#result == null")
public String toText(String html) {
if (StringUtils.isBlank(html)) {
return StringUtils.EMPTY;
}
Document doc = Jsoup.parseBodyFragment(html);
return getPlainText(doc);
}
......
......@@ -5,5 +5,10 @@
<%@ attribute name="accession" required="true" description="Accession" rtexprvalue="true" type="java.lang.Object" %>
<c:if test="${accession ne null}">
<a href='<local:accession-details-url accession="${accession}" />'><b><c:out value="${accession.acceNumb}"/></b></a>
<a href='<local:accession-details-url accession="${accession}" />'>
<b>
<c:catch><c:out value="${accession.acceNumb}"/></c:catch>
<c:catch><c:out value="${accession.accessionName}"/></c:catch>
</b>
</a>
</c:if>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment