|
[HepData-svn] r1764 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/componentsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Mar 18 20:29:43 GMT 2014
Author: watt Date: Tue Mar 18 20:29:43 2014 New Revision: 1764 Log: Allow HTML tag <img> in insert.html files Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayHtmlInsert.java Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayHtmlInsert.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayHtmlInsert.java Fri Mar 14 17:38:50 2014 (r1763) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayHtmlInsert.java Tue Mar 18 20:29:43 2014 (r1764) @@ -25,7 +25,8 @@ irn = _paper.getHepdataId(); } - String filename = "/home/hepdata/resource/" + irn + "/insert.html"; + //String filename = "/home/hepdata/resource/" + irn + "/insert.html"; + String filename = "/mt/home/watt/resource/" + irn + "/insert.html"; // for testing // writer.write("Systematics from " + filename + " are:"); try{ BufferedReader in = new BufferedReader(new FileReader(filename)); @@ -61,6 +62,7 @@ else if(bits[n].equals("p/")) { writer.element("p"); writer.end();} else if(bits[n].startsWith("a href")) { writer.element(bits[n]); } else if(bits[n].equals("/a")) { writer.end(); } + else if(bits[n].startsWith("img")) { writer.element(bits[n]); writer.end(); } else{ writer.write(bits[n]);} } }
More information about the HepData-svn mailing list |