Fixes #8: escapes single quote in templates