bem / project-stub

deps
313 stars 198 forks source link

HTML string from bemjson is converted to text #273

Closed rtemision closed 7 years ago

rtemision commented 7 years ago

In bemjson:

{
  block: 'some',
  content: 'Text<br/>text2'
}

Result in html some times ago:

<div class="some">Text<br/>text2</div>

Result in html now

<div class="some">Text&lt;br&gt;Text</div>
tadatuta commented 7 years ago

@rteamx that's because of new default value for escaping in bem-xjst 8.x. you may switch it off with https://github.com/bem/bem-xjst/blob/master/docs/en/3-api.md#escaping or use html field to render some particular nodes without escaping:

{
    block: 'some',
    content: {
        html: 'Text<br/>text2'
    }
}
rtemision commented 7 years ago

@tadatuta oh, i see. Thanks!