Skip to content
This repository has been archived by the owner on Apr 25, 2018. It is now read-only.

Test escaping for attributes #47

Open
davepagurek opened this issue Dec 16, 2016 · 0 comments
Open

Test escaping for attributes #47

davepagurek opened this issue Dec 16, 2016 · 0 comments

Comments

@davepagurek
Copy link
Member

We need to make sure that:

h1 Test (
  class "something_with_a_quote_\""
)

should become:

<h1 class="something_with_a_quote_&quot;">Test</h1>

...but, here's the weird thing. If we're doing a code block:

button Click me (
  onClick =>
    alert("hello");
)

that should actually become:

<button onClick="alert(&quot;hello&quot;)">Click me</button>

I didn't think that was valid but thats actually what is supposed to be done, it turns out, so we SHOULDN'T be using ~> for script attributes (script tags are another story.)

I think it's still a good idea to keep ~> in case you want to inline some html instead of emerald, but we should discourage using it for script attributes. We also need to investigate if any special escaping has to be done for script tag contents or if we an still use => there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant