Islandora/islandora_openseadragon — pull request #34 by slangerx (2014-04-05 19:13:30+00:00)
Title: Windows-compatibility: Backslashes in paths (OpenSeadragon)

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.

NOTE: This pull request replaces PR https://github.com/Islandora/islandora_openseadragon/pull/27, which was merged and then reverted.