Skip to content

Commit

Permalink
Fixing semgrep issue 2
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoffat committed May 31, 2023
1 parent 04f696c commit d8bc444
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
public class MessageMLParser extends AbstractContentParser<String, EntityJson>{

private static final Logger LOG = LoggerFactory.getLogger(PresentationMLHandler.class);

private SAXParserFactory factory = SAXParserFactory.newInstance();


static class TagFrame<X extends Tag> extends TextFrame<X> {

String id;
Expand Down Expand Up @@ -102,6 +100,7 @@ public Message apply(String message, EntityJson jsonObjects) {
Content [] out = { null };

try {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
SAXParser saxParser = factory.newSAXParser();
saxParser.parse(new InputSource(new StringReader(message)), new DefaultHandler2() {
Expand Down

0 comments on commit d8bc444

Please sign in to comment.