Medium / matador

an MVC framework for Node
http://medium.github.io/matador
Other
604 stars 41 forks source link

autoescape issue on alpha 6 #158

Closed TheEvilDev closed 9 years ago

TheEvilDev commented 9 years ago

Hey,

I'm just getting started with matador, and just following the instructions. I'm getting an issue on a clean install of matador:

soynode: Compile error Exception in thread "main" com.google.template.soy.base.SoySyntaxException: In file layout.soy: Invalid value for attribute 'autoescape' in 'template' command text (autoescape="contextual"). at com.google.template.soy.base.SoySyntaxException.createWithoutMetaInfo(SoySyntaxException.java:51) at com.google.template.soy.soytree.CommandTextAttributesParser.parse(CommandTextAttributesParser.java:135) at com.google.template.soy.soytree.TemplateBasicNodeBuilder.setCmdText(TemplateBasicNodeBuilder.java:103) at com.google.template.soy.soytree.TemplateBasicNodeBuilder.setCmdText(TemplateBasicNodeBuilder.java:46) at com.google.template.soy.soyparse.SoyFileParser.Template(SoyFileParser.java:299) at com.google.template.soy.soyparse.SoyFileParser.SoyFile(SoyFileParser.java:276) at com.google.template.soy.soyparse.SoyFileParser.parseSoyFile(SoyFileParser.java:191) at com.google.template.soy.soyparse.SoyFileSetParser.parseSoyFileHelper(SoyFileSetParser.java:266) at com.google.template.soy.soyparse.SoyFileSetParser.parseWithVersions(SoyFileSetParser.java:213) at com.google.template.soy.soyparse.SoyFileSetParser.parse(SoyFileSetParser.java:173) at com.google.template.soy.SoyFileSet.compileToJsSrcFiles(SoyFileSet.java:932) at com.google.template.soy.SoyToJsSrcCompiler.execMain(SoyToJsSrcCompiler.java:302) at com.google.template.soy.SoyToJsSrcCompiler.main(SoyToJsSrcCompiler.java:242)

soynode: [Error: Error compiling templates]

OS: OSX Yosimite Node Version: 0.10.32

Steps taken:

npm install matador -g
matador init test
cd test
node server.js

Something I'm doing wrong?

nicks commented 9 years ago

yes, the error is from closure-templates. They no longer allow autoescape="contextual". You have to do autoescape="deprecated-contextual". see: https://github.com/google/closure-templates/blob/master/java/src/com/google/template/soy/soytree/AutoescapeMode.java#L32