Too much escaping here, you're replacing &amp; with &amp;amp; which will result in &amp; in the url as param separator, which will fail. Please fix.