Permalink
Browse files

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

…ixes #1397
  • Loading branch information...
1 parent cd62032 commit 4d3488b373fb40474c84a35e3ae0dbb55e97cf18 @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 4d3488b

Please sign in to comment.