Skip to content

Commit

Permalink
add utf-8 to visualization html and replace CRLF with LF in XSLT for …
Browse files Browse the repository at this point in the history
…transformation
  • Loading branch information
celuchmarek committed Nov 20, 2023
1 parent 7319739 commit b30bee1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ public static String transform(DSSDocument documentToDisplay, String transformat
xmlSource = new DOMSource(getEformXmlFromXdcDocument(documentToDisplay));
}

transformation = transformation.replaceAll("\r\n", "\n");
var transformer = XMLUtils.getSecureTransformerFactory().newTransformer(new StreamSource(
new ByteArrayInputStream(transformation.getBytes(ENCODING))));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<!-- Doesn't allow loading any external or inline scripts, allow inline styles & images -->
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data:; style-src 'unsafe-inline';">
<style>
body {
margin: 0;
}
iframe {
border: none;
width: 100%;
height: 100%;
}
</style>

<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data:; style-src 'unsafe-inline';">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
margin: 0;
}
iframe {
border: none;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<!-- Sandboxed frame without any support for navigation or prompts -->
<iframe id="frame" sandbox></iframe>
Expand Down

0 comments on commit b30bee1

Please sign in to comment.