diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListDatatypePropertiesController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListDatatypePropertiesController.java index 6e7bb1dc2..c888cacbd 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListDatatypePropertiesController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListDatatypePropertiesController.java @@ -112,6 +112,8 @@ public class ListDatatypePropertiesController extends FreemarkerHttpServlet { } String nameStr = prop.getPublicName()==null ? prop.getName()==null ? prop.getURI()==null ? "(no name)" : prop.getURI() : prop.getName() : prop.getPublicName(); + nameStr = nameStr.replace("\"","\\\""); + nameStr = nameStr.replace("\'","\\\'"); try { json += "{ \"name\": \"" + nameStr + "\", "; } catch (Exception e) { diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListPropertyWebappsController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListPropertyWebappsController.java index 4e13eb87d..e305bd800 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListPropertyWebappsController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListPropertyWebappsController.java @@ -152,6 +152,8 @@ public class ListPropertyWebappsController extends FreemarkerHttpServlet { ObjectProperty prop = (ObjectProperty) propsIt.next(); String propNameStr = ShowObjectPropertyHierarchyController.getDisplayLabel(prop); + propNameStr = propNameStr.replace("\"","\\\""); + propNameStr = propNameStr.replace("\'","\\\'"); try { json += "{ \"name\": \"" + propNameStr + "\", "; diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ShowClassHierarchyController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ShowClassHierarchyController.java index 1ba366f28..f806e6324 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ShowClassHierarchyController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ShowClassHierarchyController.java @@ -201,9 +201,8 @@ public class ShowClassHierarchyController extends FreemarkerHttpServlet { else if ( position < previous_posn ) { tempString += "}, { \"name\": "; } - try { - tempString += "\""+vcw.getLocalNameWithPrefix()+"\", "; + tempString += "\""+ vcw.getLocalNameWithPrefix() +"\", "; } catch (Exception e) { tempString += "\" " + ((vcw.getLocalNameWithPrefix() == null) ? "" : vcw.getLocalNameWithPrefix()) + "\", "; } diff --git a/webapp/web/js/siteAdmin/objectPropertyHierarchyUtils.js b/webapp/web/js/siteAdmin/objectPropertyHierarchyUtils.js index 71b09397c..4e5eb28ce 100644 --- a/webapp/web/js/siteAdmin/objectPropertyHierarchyUtils.js +++ b/webapp/web/js/siteAdmin/objectPropertyHierarchyUtils.js @@ -182,10 +182,10 @@ } if ( this.children.length == 1 ) { - subclassString += " (1 subclass)"; + subclassString += " (1 subproperty)"; } else if ( this.children.length > 1 ) { - subclassString += " (" + this.children.length + " subclasses)"; + subclassString += " (" + this.children.length + " subproperties)"; } childDetails += "