-
-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jruby): serialize entity refs or the replacement text, not both (#…
…3272) **What problem is this PR intended to solve?** Two things getting fixed here: 1. We were not calling `setFeature(FEATURE_NOT_EXPAND_ENTITY, ...)` correctly. It defaults to true, and we were conditionally setting it to true. Instead, let's just explicitly set this feature (and the other features we care about) to avoid mistaken assumptions about the default. 2. We were rendering the children of the EntityReference, which contains the replacement text, as well as the EntityReference itself. We should only ever render one or the other. If NOENT is false, though, there won't be any EntityReferences in the DOM. So: if we encounter an EntityReference, don't render its children. See https://xerces.apache.org/xerces-j/features.html section on `create-entity-ref-nodes` for a deeper explanation of the parser behavior. Closes #3270 **Have you included adequate test coverage?** Yes **Does this change affect the behavior of either the C or the Java implementations?** This fixes a bug in the Java implementation, so it behaves like the C impl.
- Loading branch information
Showing
4 changed files
with
96 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters