diff --git a/src/compiler/compile/render_dom/wrappers/Element/index.ts b/src/compiler/compile/render_dom/wrappers/Element/index.ts index 454e50606e..00dd32f655 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/index.ts @@ -1001,19 +1001,7 @@ function to_html(wrappers: Array { - if (chunk.type === 'Text') { - state.quasi.value.raw += escape_html(chunk.data); - } else { - literal.quasis.push(state.quasi); - literal.expressions.push(chunk.manipulate(block)); - - state.quasi = { - type: 'TemplateElement', - value: { raw: '' } - }; - } - }); + to_html_for_attr_value(value_attribute, block, literal, state); } } @@ -1065,3 +1041,19 @@ function to_html(wrappers: Array { + if (chunk.type === 'Text') { + state.quasi.value.raw += escape_html(chunk.data); + } else { + literal.quasis.push(state.quasi); + literal.expressions.push(chunk.manipulate(block)); + + state.quasi = { + type: 'TemplateElement', + value: { raw: '' } + }; + } + }); +}