Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsonViewModel causes double-slash when returning file paths #9

Closed
weierophinney opened this issue Dec 31, 2019 · 2 comments
Closed

Comments

@weierophinney
Copy link
Member

As per the title, when setting a variable to the view that contains a file path, the directory separators are escaped resulting in a double-slash in the returned response body (on win 10 running zend server 9). Is there any way to set the view to use the constant JSON_UNESCAPED_SLASHES?


Originally posted by @bogal at zendframework/zend-view#141

@weierophinney
Copy link
Member Author

you may need to extends the JsonModel and override the serialize() function


Originally posted by @samsonasik at zendframework/zend-view#141 (comment)

@samsonasik
Copy link
Member

I'm closing it as can be achieved by extends the JsonModel and override the serialize() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants