From f4080f10cfc3ca14761693ee8d8b8446010a002f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A1ndor=20Holozsny=C3=A1k?= Date: Sun, 23 Apr 2023 22:37:58 +0200 Subject: [PATCH] fix(core): Header and footer templates are not escaping the custom header and footer content (#8) --- examples/custom-footer.adoc | 2 +- examples/custom-header.adoc | 2 +- .../src/main/resources/templates/adoc/footer.adoc.hbs | 2 +- .../src/main/resources/templates/adoc/header.adoc.hbs | 2 +- .../src/main/resources/templates/md/footer.md.hbs | 2 +- .../src/main/resources/templates/md/header.md.hbs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/custom-footer.adoc b/examples/custom-footer.adoc index 3223589..730a549 100644 --- a/examples/custom-footer.adoc +++ b/examples/custom-footer.adoc @@ -1 +1 @@ -Custom footer !! \ No newline at end of file +== Custom footer !! \ No newline at end of file diff --git a/examples/custom-header.adoc b/examples/custom-header.adoc index 5d9e72f..fbe83e7 100644 --- a/examples/custom-header.adoc +++ b/examples/custom-header.adoc @@ -1 +1 @@ -Custom header !! \ No newline at end of file +== Custom header !! \ No newline at end of file diff --git a/jbang-catalog-document-generator-core/src/main/resources/templates/adoc/footer.adoc.hbs b/jbang-catalog-document-generator-core/src/main/resources/templates/adoc/footer.adoc.hbs index 1bd1ff6..dfa0f30 100644 --- a/jbang-catalog-document-generator-core/src/main/resources/templates/adoc/footer.adoc.hbs +++ b/jbang-catalog-document-generator-core/src/main/resources/templates/adoc/footer.adoc.hbs @@ -1,5 +1,5 @@ {{#if customContent.customFooterContent~}} -{{customContent.customFooterContent}} +{{{customContent.customFooterContent}}} {{/if~}} {{#if customization.includeGenerationDate ~}} diff --git a/jbang-catalog-document-generator-core/src/main/resources/templates/adoc/header.adoc.hbs b/jbang-catalog-document-generator-core/src/main/resources/templates/adoc/header.adoc.hbs index 89dcd60..4d22511 100644 --- a/jbang-catalog-document-generator-core/src/main/resources/templates/adoc/header.adoc.hbs +++ b/jbang-catalog-document-generator-core/src/main/resources/templates/adoc/header.adoc.hbs @@ -1,5 +1,5 @@ {{~#if description}}= {{description}} {{/if~}} {{> templates/adoc/toc.adoc}} {{#if customContent.customHeaderContent~}} -{{customContent.customHeaderContent}} +{{{customContent.customHeaderContent}}} {{/if~}} \ No newline at end of file diff --git a/jbang-catalog-document-generator-core/src/main/resources/templates/md/footer.md.hbs b/jbang-catalog-document-generator-core/src/main/resources/templates/md/footer.md.hbs index 1bd1ff6..dfa0f30 100644 --- a/jbang-catalog-document-generator-core/src/main/resources/templates/md/footer.md.hbs +++ b/jbang-catalog-document-generator-core/src/main/resources/templates/md/footer.md.hbs @@ -1,5 +1,5 @@ {{#if customContent.customFooterContent~}} -{{customContent.customFooterContent}} +{{{customContent.customFooterContent}}} {{/if~}} {{#if customization.includeGenerationDate ~}} diff --git a/jbang-catalog-document-generator-core/src/main/resources/templates/md/header.md.hbs b/jbang-catalog-document-generator-core/src/main/resources/templates/md/header.md.hbs index bd9eaec..b3e36f6 100644 --- a/jbang-catalog-document-generator-core/src/main/resources/templates/md/header.md.hbs +++ b/jbang-catalog-document-generator-core/src/main/resources/templates/md/header.md.hbs @@ -1,5 +1,5 @@ {{~#if description}}# {{description}} {{/if~}} {{> templates/md/toc.md}} {{#if customContent.customHeaderContent~}} -{{customContent.customHeaderContent}} +{{{customContent.customHeaderContent}}} {{/if~}} \ No newline at end of file