appendContent/prependContent escapes html
golyshevd opened this issue · 3 comments
golyshevd commented
bemjson
{
block: 'foo'
}
bemhtml
block('foo')(
prependContent()(() => ({
elem: 'x',
content: 'before'
})),
appendContent()(() => ({
elem: 'x',
content: 'after'
}))
);
result
<div class="foo"><div class="foo__x">before</div><div class="foo__x">after</div></div>
Live example https://goo.gl/5wXovY
guess appendContent/prependContent is just sugar for content
+ applyNext
, but this behaviour is unexpected
miripiruni commented
BTW, in this case you don’t need use arrow function at all.
block('foo')(
prependContent()({
elem: 'x',
content: 'before'
}),
appendContent()({
elem: 'x',
content: 'after'
})
);
I detect that bug exists only with arrow function…
qfox commented
Same with usual functions: https://goo.gl/82s0Hr
miripiruni commented
@zxqfox of course. And I fixed it already.