-
Notifications
You must be signed in to change notification settings - Fork 130
Conversation
if (this.useRouter) { | ||
name = url.parse(name).path; | ||
if(name.indexOf('.') !== -1){ | ||
name += '.jsx'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bodyscripter can you please explain what is being done here? we cannot assume that all files will have jsx
extension
I know that, but if we don't assume that all files' extension are 'jsx', then it's difficult to fix this bug :| |
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? |
1 similar comment
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 |
But I think that the cause of error due to |
No description provided.