Polish "Use HTTPS for externals links where possible"

See gh-611
This commit is contained in:
Andy Wilkinson
2019-03-26 12:00:27 +00:00
parent cb5d7c2220
commit 2dda908c7e
4 changed files with 18 additions and 17 deletions

View File

@@ -82,7 +82,7 @@ public class PrettyPrintingContentModifier implements ContentModifier {
public byte[] prettyPrint(byte[] original) throws Exception {
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{https://xml.apache.org/xslt}indent-amount",
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount",
"4");
transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "yes");
ByteArrayOutputStream transformed = new ByteArrayOutputStream();

View File

@@ -68,7 +68,8 @@ public class LinkExtractorsPayloadTests {
public void singleLink() throws IOException {
Map<String, List<Link>> links = this.linkExtractor
.extractLinks(createResponse("single-link"));
assertLinks(Arrays.asList(new Link("alpha", "https://alpha.example.com", "Alpha")),
assertLinks(
Arrays.asList(new Link("alpha", "https://alpha.example.com", "Alpha")),
links);
}