Commit 13b65736 authored by Marko Luukkainen's avatar Marko Luukkainen Committed by Tuukka Lehtonen

Fix poor syntax in search result HMTL generation.

`)`was in wrong place.

gitlab #680

Change-Id: If62e3a4e146b05f26b912db0b245a1bb3cc77193


(cherry picked from commit 720fdc10)
parent 3c824731
......@@ -53,15 +53,15 @@ public class NameAndTypeRow implements SearchResultRow {
switch (column) {
case 0:
return "<a class=\"small\" href=\"resource:"+ resource.getResource() +"\"" + (resource.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( resource.getUri() )+"\">")+StringUtil.escape(resource.getName())+"</a>";
return "<a class=\"small\" href=\"resource:"+ resource.getResource() +"\"" + (resource.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( resource.getUri() ))+"\">"+StringUtil.escape(resource.getName())+"</a>";
case 1:
String s = "";
for (NamedResource type : principalTypes)
s+="<a class=\"small\" href=\"resource:"+ type.getResource() +"\"" + (type.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( type.getUri() )+"\">")+StringUtil.escape(type.getName())+"</a>";
s+="<a class=\"small\" href=\"resource:"+ type.getResource() +"\"" + (type.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( type.getUri() ))+"\">"+StringUtil.escape(type.getName())+"</a>";
return s;
case 2:
if (parent != null)
return "<a class=\"small\" href=\"resource:"+ parent.getResource() +"\"" + (parent.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( parent.getUri() )+"\">")+StringUtil.escape(parent.getName())+"</a>";
return "<a class=\"small\" href=\"resource:"+ parent.getResource() +"\"" + (parent.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( parent.getUri() ))+"\">"+StringUtil.escape(parent.getName())+"</a>";
return "";
default:
return "";
......
......@@ -39,10 +39,10 @@ public class NameRow implements SearchResultRow {
public String getContent(int column) {
switch (column) {
case 0:
return "<a class=\"small\" href=\"resource:"+ resource.getResource() +"\"" + (resource.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( resource.getUri() )+"\">")+StringUtil.escape(resource.getName())+"</a>";
return "<a class=\"small\" href=\"resource:"+ resource.getResource() +"\"" + (resource.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( resource.getUri() ))+"\">"+StringUtil.escape(resource.getName())+"</a>";
case 1:
if (parent != null)
return "<a class=\"small\" href=\"resource:"+ parent.getResource() +"\"" + (parent.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( parent.getUri() )+"\">")+StringUtil.escape(parent.getName())+"</a>";
return "<a class=\"small\" href=\"resource:"+ parent.getResource() +"\"" + (parent.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( parent.getUri() ))+"\">"+StringUtil.escape(parent.getName())+"</a>";
return "";
default:
return "";
......
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