From 5d3392c87912974b4612bb62bcf1d75d7d43603f Mon Sep 17 00:00:00 2001 From: Paul Herron Date: Thu, 2 Jul 2026 13:18:13 +0100 Subject: [PATCH 1/2] Enable links in description blocks We currently have a number of instances where html tags are being output to the page inside description blocks instead of displaying active links. This is due to Jinja escaping HTML. This change flags the html as safe and allows the tags to be rendered on the page without escaping. --- templates/specification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/specification.html b/templates/specification.html index 1d6202bad..2b315266b 100644 --- a/templates/specification.html +++ b/templates/specification.html @@ -104,11 +104,11 @@ {% endblock dlStyle %} {% macro sentence_case(text) %} - {{ text[0]|upper}}{{text[1:] }} + {{ text[0]|upper}}{{text[1:] | safe }} {% endmacro %} {% macro sentence_end(text) %} - {{ text.strip() }}. + {{ text.strip() | safe }}. {% endmacro %} {% macro sentence(text) %} From 0b582574f4886c91c7aa868fa67630cb64d8b144 Mon Sep 17 00:00:00 2001 From: Paul Herron Date: Thu, 2 Jul 2026 13:29:01 +0100 Subject: [PATCH 2/2] Fix broken anchor links in docs Previously links themselves were broken due to html tags being escaped by Jinja. They were fixed in a previous commit (a8990bd16928498e87feec8585422aa8fcb6ab6f) but numerous anchor links are out of data and no longer works. This change corrects the links. --- content/specification/article-4-direction.md | 8 +++--- content/specification/design-code.md | 18 ++++++------- content/specification/listed-building.md | 2 +- .../specification/tree-preservation-order.md | 26 +++++++++---------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/content/specification/article-4-direction.md b/content/specification/article-4-direction.md index 6c841b2df..bb286b4ec 100644 --- a/content/specification/article-4-direction.md +++ b/content/specification/article-4-direction.md @@ -3,7 +3,7 @@ consideration: article-4-directions datasets: - dataset: article-4-direction fields: - - description: the reference for the article 4 direction + - description: the reference for the article 4 direction field: reference guidance: | A reference or ID for each article 4 direction that is: @@ -82,7 +82,7 @@ datasets: name: article 4 direction - dataset: article-4-direction-area fields: - - description: the reference for the article 4 direction area + - description: the reference for the article 4 direction area field: reference guidance: | A reference or ID for each article 4 direction area that is: @@ -96,14 +96,14 @@ datasets: field: name guidance: | The official name of the article 4 direction. Example: `Old Market` - - description: the reference for the article 4 direction entry + - description: the reference for the article 4 direction entry field: article-4-direction guidance: | The reference for the article 4 direction used in the article 4 direction dataset. Example: `A4D1` - dataset: permitted-development-right - description: a list of one or more reference values for permitted development right entries, separated by a semi-colon ';'. + description: a list of one or more reference values for permitted development right entries, separated by a semi-colon ';'. field: permitted-development-rights guidance: | A list of the permitted development rights withdrawn by the article 4 direction. diff --git a/content/specification/design-code.md b/content/specification/design-code.md index ee8ff93f5..f6c799d7a 100644 --- a/content/specification/design-code.md +++ b/content/specification/design-code.md @@ -3,7 +3,7 @@ considerations: design-codes datasets: - dataset: design-code fields: - - description: the reference for the design code + - description: the reference for the design code field: reference - description: the name, or title of the design code field: name @@ -18,20 +18,20 @@ datasets: field: document-url - description: optional notes on the status of the design code field: notes - - description: the date the design code comes, or came into force + - description: the date the design code comes, or came into force field: start-date - - description: the date this date the design code no longer applies + - description: the date this date the design code no longer applies field: end-date - - description: the date this entry was created or last amended + - description: the date this entry was created or last amended field: entry-date name: design code - dataset: design-code-rule fields: - - description: the reference for the design code rule + - description: the reference for the design code rule field: reference - description: the name, or title of the design code rule field: name - - description: the reference for the design code where this rule is defined. + - description: the reference for the design code where this rule is defined. field: design-code - description: a short, single-line description of the design code rule field: description @@ -54,15 +54,15 @@ datasets: name: design code rule - dataset: design-code-area fields: - - description: the reference for the design code area + - description: the reference for the design code area field: reference - description: the name, or title of the design code area field: name - description: the boundaries of the design code area as a POLYGON or MULTIPOLYGON, with points in the EPSG 4326 coordinate reference system, and WGS85 datum, encoded in Well-Known Text (WKT) representation of geometry. field: geometry - - description: the reference for the design code which applies to this area + - description: the reference for the design code which applies to this area field: design-code - - description: a list of one or more reference values for design code rule entries, separated by a semi-colon ';' character. + - description: a list of one or more reference values for design code rule entries, separated by a semi-colon ';' character. field: design-code-rules - dataset: design-code-area-type description: the classification of the area, for example Rural Settlements or Urban Neighbourhood diff --git a/content/specification/listed-building.md b/content/specification/listed-building.md index 51dc2f04b..3991112c4 100644 --- a/content/specification/listed-building.md +++ b/content/specification/listed-building.md @@ -3,7 +3,7 @@ considerations: listed-buildings datasets: - dataset: listed-building-outline fields: - - description: the reference for the listed building + - description: the reference for the listed building field: reference guidance: | A reference or ID for each listed building that is: diff --git a/content/specification/tree-preservation-order.md b/content/specification/tree-preservation-order.md index af77a8622..16feedfc9 100644 --- a/content/specification/tree-preservation-order.md +++ b/content/specification/tree-preservation-order.md @@ -3,7 +3,7 @@ consideration: tree-preservation-orders datasets: - dataset: tree-preservation-order fields: - - description: the reference for the tree preservation order + - description: the reference for the tree preservation order field: reference guidance: | A reference or ID for each tree preservation order that is: @@ -70,7 +70,7 @@ datasets: Optional text on how this data was or produced, or how it can be interpreted. - description: the organisation responsible for this tree preservation order field: organisation - - description: the date this entry was created or amended + - description: the date this entry was created or amended field: entry-date guidance: | The date the entity was last updated. @@ -80,13 +80,13 @@ datasets: Write in YYYY-MM-DD format. Example: `2022-12-20` - - description: the date the tree preservation order came into force + - description: the date the tree preservation order came into force field: start-date guidance: | The date that the tree preservation order came into force, written in `YYYY-MM-DD` format. Example: `1984-03-28` - - description: the date the tree preservation order was revoked. Leave blank if the TPO is still active + - description: the date the tree preservation order was revoked. Leave blank if the TPO is still active field: end-date guidance: | Where the tree preservation order is [revoked](https://standards.planning-data.dev/principles/#we-shouldn%E2%80%99t-delete-entries-in-a-register), this should be the date that it was no longer in effect, written in `YYYY-MM-DD` format. If the TPO is still active, leave this field blank. If the tree has been felled, use the felled-date field. @@ -95,7 +95,7 @@ datasets: name: tree preservation order - dataset: tree-preservation-zone fields: - - description: the reference for the tree preservation zone + - description: the reference for the tree preservation zone field: reference guidance: | A reference or ID for each tree preservation zone that is: @@ -114,7 +114,7 @@ datasets: - reference - address - blank - - description: the reference for the tree preservation order + - description: the reference for the tree preservation order field: tree-preservation-order guidance: | The reference for the tree preservation order that covers this zone. @@ -147,7 +147,7 @@ datasets: Optional text on how this data was made or produced, or how it can be interpreted. - description: the organisation responsible for this tree preservation order field: organisation - - description: the date this entry was created or amended + - description: the date this entry was created or amended field: entry-date guidance: | The date the entity was last updated. @@ -157,13 +157,13 @@ datasets: Write in `YYYY-MM-DD` format. Example: `2022-12-20` - - description: the date the tree preservation zone came into force + - description: the date the tree preservation zone came into force field: start-date guidance: | The date that the tree preservation order came into force, written in `YYYY-MM-DD` format. Example: `1984-03-28` - - description: the date the tree preservation zone ended or leave blank if the zone is still active + - description: the date the tree preservation zone ended or leave blank if the zone is still active field: end-date guidance: | If applicable, the date that the tree preservation order was revoked, written in `YYYY-MM-DD` format. If it's still in effect, leave the cell blank. @@ -191,7 +191,7 @@ datasets: - reference - address - blank - - description: the reference for the tree preservation order + - description: the reference for the tree preservation order field: tree-preservation-order guidance: | The reference for the tree preservation order that affects this tree. @@ -246,7 +246,7 @@ datasets: field: felled-date guidance: | If applicable, the date that the tree was felled, written in `YYYY-MM-DD` format. If the tree hasn't been felled, leave this field blank. - - description: the date this entry was created or amended + - description: the date this entry was created or amended field: entry-date guidance: | The date the entity was last updated. @@ -256,13 +256,13 @@ datasets: Write in `YYYY-MM-DD` format. Example: `2022-12-20` - - description: the date from which the tree preservation order affects the tree + - description: the date from which the tree preservation order affects the tree field: start-date guidance: | The date from which the tree preservation order affects the tree, written in `YYYY-MM-DD` format. Example: `1984-03-28` - - description: the date the tree preservation order no longer affects the tree, or leave blank if the tree is still under the order. Use the felled-date if the tree has been felled. + - description: the date the tree preservation order no longer affects the tree, or leave blank if the tree is still under the order. Use the felled-date if the tree has been felled. field: end-date guidance: | Where the tree preservation order is [revoked](https://standards.planning-data.dev/principles/#we-shouldn%E2%80%99t-delete-entries-in-a-register), this should be the date that it was no longer in effect, written in `YYYY-MM-DD` format. If the TPO is still active, leave this field blank. If the tree has been felled, use the felled-date field.