Permalink
Browse files

Make sure base URIs are passed down into unescaped markup

  • Loading branch information...
ndw committed Feb 20, 2012
1 parent 1deeff9 commit 5eeb55fe6668f7f54803b4c32f43ffbdf679a5a1
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/com/xmlcalabash/library/UnescapeMarkup.java
@@ -159,7 +159,12 @@ public void run() throws SaxonApiException {
escapedContent = "<wrapper>" + escapedContent + "</wrapper>";
StringReader sr = new StringReader(escapedContent);
- XdmNode unesc = runtime.parse(new InputSource(sr));
+
+ // Make sure the nodes in the unescapedContent get the right base URI
+ InputSource is = new InputSource(sr);
+ is.setSystemId(doc.getBaseURI().toASCIIString());
+
+ XdmNode unesc = runtime.parse(is);
// Now ignore the wrapper that we added...
XdmNode dummyWrapper = S9apiUtils.getDocumentElement(unesc);

0 comments on commit 5eeb55f

Please sign in to comment.