zendframework / zend-view

View component from Zend Framework
BSD 3-Clause "New" or "Revised" License
49 stars 61 forks source link

JsonViewModel causes double-slash when returning file paths #141

Open bogal opened 7 years ago

bogal commented 7 years ago

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?

samsonasik commented 6 years ago

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

weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-view; a new issue has been opened at https://github.com/laminas/laminas-view/issues/9.