I've managed it by changing the "/" character to "|" before executing the REST-call. The encode of the Javascript parameter is working like this.
selectedHostList = encodeURIComponent(
$('#select_hostlist').val().replace('/','|'));
My PHP REST-service uses the following to convert those back into the needed values
$list = urldecode($list);
$list = mysql_real_escape_string($list);
$list = str_replace("|", "/", $list);