Fix potential server error in FeedServlet with invalid XML characters

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2879 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Graham Triggs
2008-04-10 15:23:20 +00:00
parent 3f111932d5
commit a1bbecaeb9

View File

@@ -383,7 +383,7 @@ public class FeedServlet extends DSpaceServlet
}
// put in container-level data
channel.setDescription(description);
channel.setDescription(description.replaceAll("\\p{Cntrl}", ""));
channel.setLink(objectUrl);
//build channel title by passing in type and title
String channelTitle = MessageFormat.format(labels.getString(clazz + ".feed.title"),
@@ -575,7 +575,7 @@ public class FeedServlet extends DSpaceServlet
}//end while
Description descrip = new Description();
descrip.setValue(descBuf.toString());
descrip.setValue(descBuf.toString().replaceAll("\\p{Cntrl}", ""));
rssItem.setDescription(descrip);