Closed ghost closed 7 years ago
but what is the bug here @bodyscripter ?
Suppose I have a URL is: http://localhost/profile/body.scripter. I use res.render(req.url, ...), then react-engine will parse URL to the corresponding template file that has '.scripter' as its extension, this will throws a error in the rendering process.
can we make this generic to allow a white listed set of extension then?
can we make this generic to allow a white listed set of extension then?
We can create a white listed set of extension, it works, but we have to modify express/lib/view.js in express module (https://github.com/paypal/react-engine/issues/139,) don't need to update react-engine
can't we do this in lib/expressView.js
?
But I think that the cause of error due to react-engine
use res.render with primary parameter is req.url, while primary parameter of express's View function is the name of file that has or doesn't has a extension.
I know that, but if we don't assume that all files' extension are 'jsx', then it's difficult to fix this bug :|