'Replace colons with hyphens in href and id attributes.
Some readers crash because they interpret the part as a
transport protocol specification.'

def fix_ids(self, tree):

    for node in tree.traverse(nodes.reference):
        if ('refuri' in node):
            m = self.refuri_re.match(node['refuri'])
            if m:
                node['refuri'] = self.fix_fragment(m.group(1), m.group(2))
        if ('refid' in node):
            node['refid'] = self.fix_fragment('', node['refid'])
    for node in tree.traverse(addnodes.desc_signature):
        ids = node.attributes['ids']
        newids = []
        for id in ids:
            newids.append(self.fix_fragment('', id))
        node.attributes['ids'] = newids
