diff --git a/lib/util.php b/lib/util.php index 8204994..5f274c0 100644 --- a/lib/util.php +++ b/lib/util.php @@ -15,6 +15,12 @@ function mkshield($left_str, $right_str, $color_str) { } else { $retn = file_get_contents('https://img.shields.io/badge/'.$filename); + + // We need unique IDs + $prefix = substr(sha1($filename), 8).'-'; + $retn = str_replace('id="', 'id="'.$prefix, $retn); + $retn = str_replace('url(#', 'url(#'.$prefix, $retn); + file_put_contents($cache_path, $retn); return $retn;