send root without spaces to template
fix regex and send root without spaces to template