pandoc/test/command/3792.md
John MacFarlane be9957bddc Escape MetaString values (as added with --metadata flag).
Previously they would be transmitted to the template without
any escaping.

Note that `--M title='*foo*'` yields a different result from

    ---
    title: *foo*
    ---

In the latter case, we have emphasis; in the former case, just
a string with literal asterisks (which will be escaped
in formats, like Markdown, that require it).

Closes #3792.
2017-08-12 20:27:42 -07:00

175 B

Make sure metadata values are treated as strings, and properly escaped.

% pandoc -t markdown -s -M title="<this> *that*"
ok
^D
---
title: '\<this\> \*that\*'
---

ok