Don't append fragment if there's no data.
Use ampersands instead of pipes; since some clients break urls on pipes.
Split in encoded pipes too, for legacy compatibility.