Islandora/islandora_openseadragon — pull request #35 by slangerx (2014-04-05 19:50:21+00:00)
Title: Windows-compatibility: Backslashes in paths (OpenSeadragon: 7.x-1.3)

Some Windows-incompatibilities have crept into the Islandora codebase ([additional background can be found here](https://groups.google.com/d/msg/islandora/0MAhLDjbago/9knbOynlyIcJ "Islandora 7 and Windows: Patches and Tips")).

When the page first loads, the OpenSeadragon viewer caches the JP2 file in the tomcat temp directory. However, since [Djatoka is returning bad JSON](http://bit.ly/1id6dBo "[djatoka-devel] OpenURLResponse not returning true JSON: Windows paths are misinterpreted"), any backslashes in the file path (found in Windows environments) end up getting misinterpreted by jQuery. As a result, the JP2 image never loads inside of the viewer. This patch escapes any existing backslashes in the "imagefile" element (returned by Djatoka) and fixes the problem.