SVG use with xlink issue with base tag

I've been working on a project that uses SVG elements that are added in a <use /> tag with the xlink:href attribute.

Problem is that Silverstripe uses a <base /> tag that means that the SVG xlink attribute doesn't work correctly.

You have a couple of choices, fix or remove the base tag (that breaks a lot of things unfortunately) or you could use this handy JS fixer. See this Stackoverflow answer for an explanation.