New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diet : string escaping broken #792

Closed
mihails-strasuns opened this Issue Aug 26, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@mihails-strasuns
Contributor

mihails-strasuns commented Aug 26, 2014

With latest alpha this diet snippet:

input(name="name" value="#{name}")

results in the following HTML generated:

<input name="name&quot; value=&quot;"/>

Looks like result of overly eager HTML string escaping. It has worked ages ago (I am updating my old example snippets)

@s-ludwig s-ludwig closed this in d150982 Aug 26, 2014

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Aug 26, 2014

Member

BTW, the reason why it worked before without a comma was that due to a recently fixed bug, the parts around string interpolations haven't been escaped at all, so that the whole thing was still wrongly treated as a single attribute, but the contents were emitted verbatim. With the fix now, it will result in a D compiler error message, because "name" value="#{name}" is treated as a D expression.

Member

s-ludwig commented Aug 26, 2014

BTW, the reason why it worked before without a comma was that due to a recently fixed bug, the parts around string interpolations haven't been escaped at all, so that the whole thing was still wrongly treated as a single attribute, but the contents were emitted verbatim. With the fix now, it will result in a D compiler error message, because "name" value="#{name}" is treated as a D expression.

@mihails-strasuns

This comment has been minimized.

Show comment
Hide comment
@mihails-strasuns

mihails-strasuns Aug 26, 2014

Contributor

Oh so comma was needed all the time? http://vibed.org/templates/diet probably should have a multi-attribute example to make it less surprising for those less familiar with Jade ;)

Contributor

mihails-strasuns commented Aug 26, 2014

Oh so comma was needed all the time? http://vibed.org/templates/diet probably should have a multi-attribute example to make it less surprising for those less familiar with Jade ;)

s-ludwig added a commit to vibe-d/vibed.org that referenced this issue Aug 26, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment