merging r10007 to the trunk

This commit is contained in:
tworrall 2012-08-09 19:10:49 +00:00
parent 4f56554901
commit eae6359a6d
2 changed files with 8 additions and 2 deletions

View file

@ -207,6 +207,8 @@ public class ShowDataPropertyHierarchyController extends FreemarkerHttpServlet {
} }
String nameStr = dp.getPublicName()==null ? dp.getName()==null ? dp.getURI()==null ? "(no name)" : dp.getURI() : dp.getName() : dp.getPublicName(); String nameStr = dp.getPublicName()==null ? dp.getName()==null ? dp.getURI()==null ? "(no name)" : dp.getURI() : dp.getName() : dp.getPublicName();
nameStr = nameStr.replace("\"","\\\"");
nameStr = nameStr.replace("\'","\\\'");
try { try {
tempString += "\"<a href='datapropEdit?uri="+URLEncoder.encode(dp.getURI(),"UTF-8")+"'>" + nameStr + "</a>\", "; tempString += "\"<a href='datapropEdit?uri="+URLEncoder.encode(dp.getURI(),"UTF-8")+"'>" + nameStr + "</a>\", ";
} catch (Exception e) { } catch (Exception e) {

View file

@ -208,10 +208,14 @@ public class ShowObjectPropertyHierarchyController extends FreemarkerHttpServlet
tempString += "}, { \"name\": "; tempString += "}, { \"name\": ";
} }
String nameStr = getDisplayLabel(op)==null ? "(no name)" : getDisplayLabel(op);
nameStr = nameStr.replace("\"","\\\"");
nameStr = nameStr.replace("\'","\\\'");
try { try {
tempString += "\"<a href='propertyEdit?uri="+URLEncoder.encode(op.getURI(),"UTF-8") + "'>" + getDisplayLabel(op)+"</a>\", "; tempString += "\"<a href='propertyEdit?uri="+URLEncoder.encode(op.getURI(),"UTF-8") + "'>" + nameStr +"</a>\", ";
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
tempString += "\"" + getDisplayLabel(op) + "\""; tempString += "\"" + nameStr + "\"";
log.error("Unsupported: URLEncoder.encode() with UTF-8"); log.error("Unsupported: URLEncoder.encode() with UTF-8");
} }