Netflix/Hystrix — pull request #152 by mrhooray (2013-07-10 23:42:39+00:00)
Title: escape meta-characters to fix dashboard

I want to solve #100 and #125 in a proper way rather than directly replacing 'invalid characters'.

By looking at the code, diagram flooding is caused by:
https://github.com/Netflix/Hystrix/blob/master/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js#L211
https://github.com/Netflix/Hystrix/blob/master/hystrix-dashboard/src/main/webapp/components/hystrixThreadPool/hystrixThreadPool.js#L170

The selector does not work as expected due to [meta-characters](http://api.jquery.com/category/selectors/). Although replacing those meta-characters would work to prevent flooding, it will cause further bug since different meta-characters on the same position of two different commands lead to the same command name (e.g. both my:command and my-command will reduce to my_command).

The clean approach is to escape those meta-characters in command name when used in selectors. Another advantage of this way is that original command/thread pool name can be displayed on the web page.

This patch generates escapedName in data object and replaces original command name occurrences in selectors.