Select element with double dot in id, error: "#octo:cat" is not a valid selector

Select element with double dot in id, error: "#octo:cat" is not a valid selector

给定一个带有现有 id="kvg:StrokeNumbers_07425",

的 svg
<g id="kvg:StrokeNumbers_07425" style="font-size:8;fill:blue;">...</g>

我执行以下操作:

d3.select("#kvg:StrokeNumbers_07425").attr("style","fill:red;");

并收到以下错误消息:

Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document': 
'#kvg:StrokeNumbers_07425' is not a valid selector.

这可能是由于 :

我应该怎么做才能让它发挥作用?


编辑: http://jsfiddle.net/0v7jjpdd/1/

像这样转义:

d3.select("#kvg\:StrokeNumbers_07425").attr("style","fill:red;");

JSFiddle Link