Fix enlarging in ImageViewer
authorTim Düsterhus <duesterhus@woltlab.com>
Sun, 3 Feb 2013 18:22:01 +0000 (19:22 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Sun, 3 Feb 2013 18:22:34 +0000 (19:22 +0100)
wcfsetup/install/files/js/WCF.ImageViewer.js

index 183db1a07412cc8f615ce5b5fadb38464799caf8..caf4ce0a5e89858cb4b02ef15d7798838eb37850 100644 (file)
@@ -62,7 +62,7 @@ WCF.ImageViewer = Class.extend({
        _enlarge: function() {
                var $url = $('#lbImage').css('backgroundImage');
                if ($url) {
-                       $url = $url.substring(4, $url.length - 1);
+                       $url = $url.replace(/^url\((["']?)(.*)\1\)$/, '$2');
                        window.location = $url;
                }
        },