Skip to content
This repository has been archived by the owner on Sep 5, 2018. It is now read-only.

decoupled from depending on exphbs.compileTemplate #2

Merged
merged 1 commit into from
Mar 17, 2015

Conversation

adon-at-work
Copy link
Contributor

Motivation: ericf/express-handlebars#105 is going to break the public API
An equivalent compile/precompile functions are now made "protected"

Hence, we should directly override the compile/precompile functions of Handlebars, and made the patched Handlebars a parameter of express-handlebars. In view of this, I'm separating the necessary patches to secure-handlebars.js, which can later be forked and made standalone for a new package secure-handlebars.

But anyway, the following changes can work well with both the current version of express-handlebars, and its forthcoming PR 105. And in this particular change, we're able to make way for handlebars 3.0 directly.

@yahoocla
Copy link

CLA is valid!

@adon-at-work
Copy link
Contributor Author

@neraliu, please review. Thanks.

xssFilters = require('xss-filters'),
privateFilters = xssFilters._privFilters,
ContextParserHandlebars = require("context-parser-handlebars");
secureHandlebars = require('./secure-handlebars');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good! we can simply create the secure-handlebars and replace this line later.

neraliu added a commit that referenced this pull request Mar 17, 2015
decoupled from depending on exphbs.compileTemplate
@neraliu neraliu merged commit 8931100 into master Mar 17, 2015
@adon-at-work adon-at-work deleted the reduced-dependency-overhead branch March 18, 2015 06:24
@adon-at-work adon-at-work restored the reduced-dependency-overhead branch March 26, 2015 10:38
@adon-at-work adon-at-work deleted the reduced-dependency-overhead branch March 26, 2015 10:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants