Replies: 1 comment
-
HTML encodingAs Obsidian uses Markdown, and Markdown allows embedding HTML* in it, it woul be quite natural to have a possibility to encode any possible HTML special characters a variable value might have, e.g. (This kind of escaping can be needed if the variable's source can be external, e.g. Possible syntax for encoding:
*) Actually, Markdown is compiled to HTML, and if any HTML is in the source text, Markdown does not deny it in any way, it let's the HTML pass to the final result. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Closing an old issue #11 and moving future escaping discussion here
Issue #11 has discussed about escaping variable values. First off, as the issue is older than the Discussions section in this GitHub repository, it contains discussion about more things than just what the first version of variable value escaping will be bringing. Also, when I started the issue, I had no clue how the escaping will be done, so the issue contains varying ideas on how to implement escaping, but most of them are now obsolete.
Future coming version 0.7.0 will close issue #11. Now the situation is that an expiremental way to escape variable values has been found and has been implemented, and will be released in
0.7.0
, so the old issue with partly hypothetic ideas can be closed soon.I opened this discussion so that I can bury most of the old ideas in #11, but also so that I can pick up one idea that I might want to bring into life later. But before that, I'll revise what is the current status with how the escaping will work.
The chosen method for escaping
0.7.0
will introduce the following escaping style:\
or a`
character in front of every character that is not an ASCII letter, a number or an underscore.{{variable}}
expressions. Everytinhg outside of{{variables}}
are not escaped, the user is expected to do any needed escaping outside of variables.!
to a variable, e.g.{{!file_name}}
. Preventing escaping is not recommended, and it shold not be needed in most cases when using variables, but it's possible if a user happens to have a really rare use-case that cannot be implemented with escaping.For the future: URL encoding
I had already forgotten this idea. Anyway, it's a good thing not to implement this yet in
0.7.0
, as it's a bit different from the basic escaping feature. But it's definitely something that will be useful.A quote from issue #11:
Beta Was this translation helpful? Give feedback.
All reactions