sanitize element names in preprocess step

pull/7738/head
Rich-Harris 9 years ago
parent 5dac68ed5a
commit dc54caaef7

@ -174,7 +174,7 @@ const preprocessors = {
if ( isComponent ) { if ( isComponent ) {
node._state = getChildState( state ); node._state = getChildState( state );
} else { } else {
const name = block.getUniqueName( node.name ); const name = block.getUniqueName( node.name.replace( /[^a-zA-Z0-9_$]/g, '_' ) );
node._state = getChildState( state, { node._state = getChildState( state, {
isTopLevel: false, isTopLevel: false,

Loading…
Cancel
Save