On Tuesday, 24 May 2016 at 15:03:28 UTC, Bauss wrote:
On Tuesday, 24 May 2016 at 15:00:34 UTC, Bauss wrote:
On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:
On Tuesday, 24 May 2016 at 14:54:27 UTC, Bauss wrote:
On Tuesday, 24 May 2016 at 13:09:28 UTC, Kagamin wrote:
The values are injected unescaped by default?


Yes. To escape there is the escape function.

Take a look at the comparison for the result.

I'm going to figure out a syntax for escaping though, so there'll be one for both.

Not sure what symbols to use though. @$=value_to_escape; is probably going to be the result.

Note: If you have a better suggestion, feel free to come with one :)

No wait I forgot it already is possible.

Using @(value_to_escape)

I am such a mess today and also wish there was an edit button for forum posts.

@(value_to_escape) will only escape text and not variables, so a syntax for an expression/variable is still up. I will go with the @$= syntax for now

A commit has now been done with escaping for variables / expressions.

Can be seen here:
https://github.com/bausshf/Diamond/commit/e082d63d2a351a9e57cfc7f8bee8182711919759

It'll come in version 0.2.4

Reply via email to