quote category terms and encode location urls

Hi guys,

as discussed, please consider the following patch. Remember, it is not the full solution yet.


Björn