fixes xss in members tab select boxes

What this does is actually copying the behavior of the boxes for timelines. As they both use the same functions, this code should be refactored. However, this is a security fix for a bug in our 'master' and I guess doing a quick fix is justified.