ember-fastboot / ember-fastboot/fastboot

Different treatment for htmlSafe in fastboot

Open
#199 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
155
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Reproduction:**
```js
// app/components/example-thing.js
exampleCss: computed(function() {
return [htmlSafe('.test > .thing'), ' { background-color: red; }'].join('\n');
}),
```
```hbs
{{!-- app/templates/components/example-thing.hbs --}}
{{exampleCss}}


hi hi hi

```
(then of course render this component in your index template or application layout)

**Expected:**
The div `.thing` should have text 'hi hi hi' and red background, even with js turned off.

**Actual:**
The div `.thing` has a red background with js turned on (after app has initialized in the browser) but no red background with js turned off. The CSS selector gets escaped by fastboot (transforming `>` into `>`) while it does not get escaped by ember-in-the-browser.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.