Git Product home page Git Product logo

Comments (10)

ClaireNeveu avatar ClaireNeveu commented on May 3, 2024

I should add, the version we are using is "com.google.template" % "soy" % "2015-04-10".

from closure-templates.

johnsensible avatar johnsensible commented on May 3, 2024

Just to say we're seeing this behaviour too.

We're trying to upgrade to the latest version (2015-04-10) and as we've previously been using noAutoescape in a couple of places wanted to be able to set the autoescaping to the old behaviour (i.e. contextual). Setting autoescape on either the individual template or namespace doesn't seem to work.

from closure-templates.

lukesandberg avatar lukesandberg commented on May 3, 2024

I believe that you now need to set it to "deprecated-contextual",

On Mon, Jun 29, 2015, 7:07 AM John Montgomery [email protected]
wrote:

Just to say we're seeing this behaviour too.

We're trying to upgrade to the latest version (2015-04-10) and as we've
previously been using noAutoescape in a couple of places wanted to be able
to set the autoescaping to the old behaviour (i.e. contextual). Setting
autoescape on either the individual template or namespace doesn't seem to
work.


Reply to this email directly or view it on GitHub
#44 (comment)
.

from closure-templates.

johnsensible avatar johnsensible commented on May 3, 2024

Ah that worked!

Digging in I see those values seem to be defined here:

https://github.com/google/closure-templates/blob/e049b2e673a5a9571aaa088f4c6d2d434d444d7b/java/src/com/google/template/soy/soytree/AutoescapeMode.java

So the valid values for autoescape would seem to be:

  • deprecated-noautoescape
  • deprecated-noncontextual
  • deprecated-contextual
  • strict

So I guess the main bug really is not getting an error when autoescape doesn't match one of those valeus. That and the documentation not matching. It still references true/false/contextual in these locations:

Just mentioning this here, as someone else might find it useful.

I don't seem to see the docs in the Repo here - otherwise I'd ask if you want them updated...

Anyway, thanks again for the info. Saved quite a bid of head scratching...

cheers,

John

from closure-templates.

lukesandberg avatar lukesandberg commented on May 3, 2024

I think I may have fixed the poor error message issue in
19c61de

I think you are just on an earlier release (sorry!).

Thanks for the pointer about the docs, I'll try to get those fixed

from closure-templates.

johnsensible avatar johnsensible commented on May 3, 2024

OK, glad to hear it's fixed and you're on top of the docs.

Guess they'll be a new release soonish?

from closure-templates.

lukesandberg avatar lukesandberg commented on May 3, 2024

@Ubehebe is in charge of maven/github pushes

from closure-templates.

lukesandberg avatar lukesandberg commented on May 3, 2024

re docs, it looks like there is an effort underway to convert all our existing docs to markdown and (eventually) get them into this repository. so updating the docs may take a while :(

from closure-templates.

lukesandberg avatar lukesandberg commented on May 3, 2024

....two months later the docs are updated. Sorry, I just lost track of this.

from closure-templates.

johnsensible avatar johnsensible commented on May 3, 2024

Hey it's done at least! Thank you.

from closure-templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.