diff --git a/editor/svg-editor.js b/editor/svg-editor.js
index d7665aec..9ec96fcd 100644
--- a/editor/svg-editor.js
+++ b/editor/svg-editor.js
@@ -627,15 +627,14 @@
// can just provide their own custom save handler and might not want the XML prolog
svg = '\n' + svg;
- // Opens the SVG in new window, with warning about Mozilla bug #308590 when applicable
- var ua = navigator.userAgent;
-
- // Chrome 5 (and 6?) don't allow saving, show source instead ( http://code.google.com/p/chromium/issues/detail?id=46735 )
- // IE9 doesn't allow standalone Data URLs ( https://connect.microsoft.com/IE/feedback/details/542600/data-uri-images-fail-when-loaded-by-themselves )
- if ((~ua.indexOf('Chrome') && $.browser.version >= 533) || ~ua.indexOf('MSIE')) {
+ // IE9 doesn't allow standalone Data URLs
+ // https://connect.microsoft.com/IE/feedback/details/542600/data-uri-images-fail-when-loaded-by-themselves
+ if (svgedit.browser.isIE()) {
showSourceEditor(0, true);
return;
}
+
+ // Opens the SVG in new window
var win = window.open('data:image/svg+xml;base64,' + Utils.encode64(svg));
// Alert will only appear the first time saved OR the first time the bug is encountered
@@ -644,8 +643,9 @@
var note = uiStrings.notification.saveFromBrowser.replace('%s', 'SVG');
// Check if FF and has
- if (ua.indexOf('Gecko/') !== -1) {
+ if (svgedit.browser.isGecko()) {
if (svg.indexOf('