4 ms·
I think google search uses this templating language: http://code.google.com/p/google-ctemplate/ http://code.google.com/p/google-ctemplate/ It makes sense that
by jcampbell1 15y ago
I think google search uses this templating language:
http://code.google.com/p/google-ctemplate/ http://code.google.com/p/google-ctemplate/
It makes sense that the ${ could cause problems.
- tptacek 15y agoHrm, but is $ a metacharacter in that language?
- RyanKearney 15y agoHrm, did you click the link?
- irahul 15y agoMost likely he did. Did you? If you did click and skim the page at 1000000000 words/sec, those `$` over there are for USD, and not part of templating system.
- brlewis 15y agoNo. It doesn't even appear on http://google-ctemplate.googlecode.com/svn/trunk/doc/reference.html http://google-ctemplate.googlecode.com/svn/trunk/doc/referen...
- simonw 15y agoIn my experience it's pretty rare for template language bugs to cause errors if user entered content includes one of their special characters. The template would have to be evaluated twice for any problems to occur - once to insert the user's template code in to placeholders within the original template , and then once again to execute the resulting combination.
- kragen 15y agoSad to say, Mustache.js has exactly this bug last time I checked, but only under some circumstances. Minimal reproduction: Mustache.to_html('{{b}}', {b: '{{c}x}' }) -> '{{c}x}' Mustache.to_html('{{#a}}{{b}}{{/a}}', {a: [{b: '{{c}x}' }]}) -> '{{c}x}' Mustache.to_html('{{b}}', {b: '{{c}}' }) -> '{{c}}' Mustache.to_html('{{#a}}{{b}}{{/a}}', {a: [{b: '{{c}}' }]}) -> '' (wrong)
- tcarnell 15y agoI disagree! It does not make sense that submitting any text via a form input should in any way interfere with a templating engine, in the same way we dont expect to be able to affect a database by entering SQL into a form field. The fact that Google brings back an empty result set to me indicates the problem is a bit deeper...