Permalink
Browse files

Match only &dialog, ?dialog, &width, ?width, &height, ?height which f…

…ixes #1397
  • Loading branch information...
1 parent 14aa588 commit 64dcb29120e2f40c29cb1ed62a8578986699db6a @parndt parndt committed May 25, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/app/assets/javascripts/refinery/admin.js.erb
@@ -70,9 +70,9 @@ init_modal_dialogs = function(){
height = parseInt($(href.match("height=([0-9]*)")).last().get(0), 10)||473,
title = $anchor.attr('title') || $anchor.attr('name') || $anchor.html() || null;
- href = href.replace(/(\&(amp\;)?)?dialog\=true/, '')
- .replace(/(\&(amp\;)?)?width\=\d+/, '')
- .replace(/(\&(amp\;)?)?height\=\d+/, '')
+ href = href.replace(/((\&(amp\;)?)|\?)dialog\=true/, '')
+ .replace(/((\&(amp\;)?)|\?)width\=\d+/, '')
+ .replace(/((\&(amp\;)?)|\?)height\=\d+/, '')
.replace(/(\?&(amp\;)?)/, '?')
.replace(/\?$/, '');

0 comments on commit 64dcb29

Please sign in to comment.