Skip to content

Commit

Permalink
Addresses #189 - synchronizes external entity expansion setting
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfl committed Jul 2, 2021
1 parent 1f81562 commit dd4f3c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/java/org/jdom2/input/SAXBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
import org.jdom2.DocType;
import org.jdom2.Document;
import org.jdom2.EntityRef;
import org.jdom2.JDOMConstants;
import org.jdom2.JDOMException;
import org.jdom2.JDOMFactory;
import org.jdom2.Verifier;
Expand Down Expand Up @@ -797,6 +798,11 @@ public void setFastReconfigure(final boolean fastReconfigure) {
public void setFeature(final String name, final boolean value) {
// Save the specified feature for later.
features.put(name, value ? Boolean.TRUE : Boolean.FALSE);
if (JDOMConstants.SAX_FEATURE_EXTERNAL_ENT.equals(name)) {
// See issue https://github.com/hunterhacker/jdom/issues/189
// And PR https://github.com/hunterhacker/jdom/pull/188
setExpandEntities(value);
}
engine = null;
}

Expand Down

0 comments on commit dd4f3c2

Please sign in to comment.