escape attribute values in SSR

pull/1155/head
Conduitry 8 years ago
parent 29a156957f
commit c481c8d2b3

@ -11,7 +11,7 @@ export default function stringifyAttributeValue(block: Block, chunks: Node[]) {
block.contextualise(chunk.expression);
const { snippet } = chunk.metadata;
return '${' + snippet + '}';
return '${__escape(' + snippet + ')}';
})
.join('');
}

@ -0,0 +1,3 @@
export default {
html: `<span title='"foo"'>foo</span>`
};

@ -0,0 +1 @@
<span title='{{"\"foo\""}}'>foo</span>
Loading…
Cancel
Save