Practice ยท 3 of 3
URL Parameter Encoder
Write buildSearchUrl(base, params) โ params is an object; return base + "?" + encoded query string where keys and values run through encodeURIComponent and pairs join with "&". An empty params object returns base unchanged.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: XSS Sinks & Encoding โ Practice