ympd/htdocs/js
Virgil Dupras fe44fca184 Fix browsing for non-ascii entity URI under Safari
Previously, browsing entities with non-ascii characters in their URI
under Safari wouldn't work. Directories would be empty, songs wouldn't
be added. I haven't tried it, but this behavior seems to be common to
Webkit-based browsers, so Chrome would be affected too.

This turned out to be because Safari normalizes all unicode strings to
NFC, breaking the link with MPD-spewed URIs, which are in NFD.

An obvious fix would have been to normalize all URIs to NFD, but
unfortunately, Safari doesn't have `str.normalize()`. Adding
normalization capabilities to our JS side would have involved
introductiing libraries such as `unorm`, which is rather big.

We could have done it on the C side, but it involves introducing `icu`,
which is far from trivial too.

After much fussing around, I stumbled on a simple solution: URI-encode
our URI when creating our browser table row. This magically prevents
Safari from trying to mess with our unicode form before we get the
chance to send it back to our server.
2015-06-20 22:39:42 -04:00
..
bootstrap-notify.js fixup table layout, notifications 2014-01-17 16:26:26 +01:00
bootstrap-slider.js fix crash when seeking without song, new slider 2014-01-16 18:32:20 +01:00
bootstrap.js replaces libwebsockets with mongoose, changed licese to gpl 2014-03-08 12:30:49 +01:00
bootstrap.min.js updated bootstrap to 3.1 2014-03-08 12:30:48 +01:00
jquery-1.10.2.js add jquery source file 2014-10-29 18:25:07 -04:00
jquery-1.10.2.min.js various fixups 2013-11-05 00:17:28 +01:00
jquery.cookie.js add manpage, jquery cookie plugin 2014-01-17 18:34:59 +01:00
mpd.js Fix browsing for non-ascii entity URI under Safari 2015-06-20 22:39:42 -04:00
sammy.js added sammy.js app routing 2013-11-07 13:47:31 +01:00