kaushalmodi / ox-hugo

A carefully crafted Org exporter back-end for Hugo
https://ox-hugo.scripter.co
GNU General Public License v3.0
867 stars 130 forks source link

fix: Escape Hugo shortcodes in description front-matter #649

Closed kaushalmodi closed 2 years ago

kaushalmodi commented 2 years ago

The description front-matter will most likely be parsed as Markdown string using $.Page.RenderString, and we do not want literal strings like "{{< .. >}}" in there be interpreted as Hugo shortcode calls.

Shortcodes are now rendered by RenderString starting Hugo v0.100.0: https://github.com/gohugoio/hugo/releases/tag/v0.100.0.

kaushalmodi commented 2 years ago

The change in this PR probably won't affect any user. The only reason this change was needed was because I literally had the Hugo shortcode braces in the description front-matter of one of the tests.