Bad algorithm for deciding form->open url