Fix #2: Trim spaces for url building