fix : avoid TypeError: Object #<SVGAnimatedString> has no method 'indexOf' when clicking on an SVG diagram with links

a minor patch to check a url is a string before attempting to call indexOf() on it to avoid barfing on SVGAnimatedString

fixes #5198