Rather than get into a hundred or more special cases for escaping characters, is there not a more generic method that could be used here? Something like the HTML %20 (space) style of hex-encoding?

I think I tried %xx originally, only to see them displayed in the playlists from xml/xsl.

Remember, I don't know anything about xml/ssl here.

??