topic_key options in js

This corrects a problem with accessing js vars instead of ruby ones.

Also, escapes the topic_key - figured a user might be able to set that.