From bc23293bb178b6abcafa0f67d432cbff6ac3c861 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 15 Feb 2017 00:07:28 +0100 Subject: content-parser: html-encode pre-defined title. updated man pages --- man/blogc-source.7.ronn | 6 ++++++ man/blogc-template.7.ronn | 2 +- src/blogc/content-parser.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/man/blogc-source.7.ronn b/man/blogc-source.7.ronn index 0273194..115ff94 100644 --- a/man/blogc-source.7.ronn +++ b/man/blogc-source.7.ronn @@ -52,6 +52,12 @@ that stores the name of the source file, without its extension. This is useful for building permalinks in templates. This variable can't be overriden by an explicit definition in source file. +The variable `TITLE` is created by the source parser by default, containing the +unparsed value of the first header found in the source file. The content is not +parsed but HTML entities are encoded. Headers inside blockquotes are ignored. +This variable can be overriden by an explicit definition in source file, that +must have the HTML entities escaped manually. + Another variable, `DESCRIPTION`, will be automatically created by the source parser. It contains the unparsed content of the first paragraph found in the source file. The content is not parsed but HTML entities are encoded. Paragraphs diff --git a/man/blogc-template.7.ronn b/man/blogc-template.7.ronn index d010a1c..c6a3af1 100644 --- a/man/blogc-template.7.ronn +++ b/man/blogc-template.7.ronn @@ -75,7 +75,7 @@ This is how a `listing_once` block is defined: {% endblock %} This is a 'real life' usage example of a `listing_once` block, supposing -that each source file defines a `TITLE` variable: +that the `TITLE` variable is defined: {% block listing_once %}