Handle UnsafeUrl and RemoveUrl clicks now and always for any future elements.

This commit is contained in:
Sipke Schoorstra
2013-11-07 18:31:22 +01:00
parent 469c2c6107
commit 6fc0c2157c
2 changed files with 2 additions and 2 deletions

View File

@@ -223,7 +223,7 @@
$(function () {
var magicToken = $("input[name=__RequestVerificationToken]").first();
if (!magicToken) { return; } // no sense in continuing if form POSTS will fail
$("a[itemprop~=UnsafeUrl]").on("click", function() {
$("body").on("click", "a[itemprop~=UnsafeUrl]", function() {
var _this = $(this);
var hrefParts = _this.attr("href").split("?");
var form = $("<form action=\"" + hrefParts[0] + "\" method=\"POST\" />");