also escape back-ticks and backslashes in text nodes in SSR code (#616)

pull/619/head
Conduitry 8 years ago
parent f016a84d45
commit 05a7a262c3

@ -3,5 +3,5 @@ import Block from '../Block';
import { Node } from '../../../interfaces';
export default function visitText ( generator: SsrGenerator, block: Block, node: Node ) {
generator.append( node.data.replace( /\${/g, '\\${' ) );
generator.append( node.data.replace( /(\${|`|\\)/g, '\\$1' ) );
}

@ -0,0 +1,3 @@
export default {
html: '<code>`${foo}\\n`</code>'
};
Loading…
Cancel
Save