graphite-project/graphite-web — pull request #1043 by 5c077yP (2014-12-02 10:24:17+00:00)
Title: Use encode URL characters in target string

Hey,

first thanks for this great project!

If been using e.g. '=' signs in my graphite metric name. This causes the __/dashboard__ view to not correctly create a graph view when clicking in the found metric. The generated graph view only contains the characters until the first '=' sign. This happens when the correct target string is given to the `Ext.urlDecode ` function which then internally only returns a part of that string.

E.g. i can see when debugging that the `graphTargetString ` string is `target=host.ip=127-0-0-1.version=v0-0-1.Service.Cpu`, but after calling `var graphTargetList = Ext.urlDecode(graphTargetString)['target'];` `graphTargetList ` is `host.ip`.

With this PR the target string is first URL encoded using `encodeURIComponent ` before give to `Ext.urlDecode`.