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

Test escaping for attributes #47

@davepagurek

Description

@davepagurek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions