Skip to content
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

[BUGFIX beta] Remove style warning when the binding is quoted #14293

Merged
merged 1 commit into from
Nov 3, 2016

Conversation

Serabe
Copy link
Member

@Serabe Serabe commented Sep 14, 2016

Given the following template:

<div style="{{myStyle}}"></div>

It behaves exactly like:

<div style={{myStyle}}></div>

Fix #11395

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but we need more tests. Specifically, we need to add tests that ensure things like style="width: 100px; {{safeStringThingy}}" warns.

@Serabe
Copy link
Member Author

Serabe commented Sep 15, 2016

Thank you for reviewing this, @rwjblue!

I've added three more tests. Let me know if you need me to add anything!

Thank you!

Given the following template:

```hbs
<div style="{{myStyle}}"></div>
```

It behaves exactly like:

```hbs
<div style={{myStyle}}></div>
```

Fix emberjs#11395
@Serabe
Copy link
Member Author

Serabe commented Oct 10, 2016

@rwjblue did I add enough tests? The new tests added in this PR are:

  • <div style="{{userValue}}"></div> with safe and unsafe strings.
  • <div style="color: green; {{userValue}}"></div> with safe string.
  • <div style="color: green; width: {{userValue}}"></div> with safe string.
  • <div style="color: green; {{userProperty}}: 42px"></div> with safe string.

@Serabe
Copy link
Member Author

Serabe commented Oct 10, 2016

Rebased and pushed to check CI

@rwjblue rwjblue merged commit 255d600 into emberjs:master Nov 3, 2016
@rwjblue
Copy link
Member

rwjblue commented Nov 3, 2016

Thanks @Serabe!

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

Successfully merging this pull request may close these issues.

2 participants