Update of /var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/error In directory james.mmbase.org:/tmp/cvs-serv14200
Modified Files: 500.jsp Log Message: CMSC-935, On the exception (500) page, escape the stacktrace,add HTMLToTEXT function See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/error See also: http://www.mmbase.org/jira/browse/CMSC-935 Index: 500.jsp =================================================================== RCS file: /var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/error/500.jsp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- 500.jsp 25 Jul 2008 15:54:10 -0000 1.8 +++ 500.jsp 18 Aug 2008 10:49:44 -0000 1.9 @@ -17,6 +17,13 @@ public static String getDateTimeString(long date) { return DATE_TIME_FORMAT.format(new Date(date)); } + // add HTMLToTEXT + public static String HTMLToTEXT(String html){ + html=html.replaceAll("<([^<>]+)>",""); + String text = html.replaceAll("=\\\"[^\\\"]*\\\""," ").replaceAll("\\<[^(\\<|\\>)]*\\>"," "); + return html.replaceAll("<([^<>]+)>",""); + + } %> <% // $Name: $ will be expanded when checked out with an explicit tagname. For Example "cvs co -r first" @@ -25,6 +32,8 @@ long ticket = System.currentTimeMillis(); String msg = com.finalist.cmsc.util.HttpUtil.getErrorInfo(request, exception, ticket, version); + // filtrate html + msg= HTMLToTEXT(msg); request.setAttribute("msg", msg); _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs