Fixed Permalink: layer contains space char is ignored

The reason is: space characters of layer names get coded to %20 in a
permalink-URL. So the names do not match any more and the first
(default?) layer is choosen. Same happens for other special characters.
Fixed it with decodeURI().