Index: trunk/extensions/ImageMap/ImageMap_body.php |
— | — | @@ -257,7 +257,9 @@ |
258 | 258 | |
259 | 259 | if ( $realmap ) { |
260 | 260 | # Construct the map |
261 | | - $mapName = "ImageMap_" . ++self::$id; |
| 261 | + # Add random number to avoid breaking cached HTML fragments that are |
| 262 | + # later joined together on the one page (bug 16471) |
| 263 | + $mapName = "ImageMap_" . ++self::$id . '_' . mt_rand( 0, 0x7fffffff ); |
262 | 264 | $mapHTML = "<map name=\"$mapName\">\n$mapHTML</map>\n"; |
263 | 265 | |
264 | 266 | # Alter the image tag |