a bug in base.js

Nov 3, 2010 at 6:37 AM
Edited Nov 3, 2010 at 6:39 AM

a bug in the follow code:

     .....

    // UnsafeUrl links -> form POST
    //todo: need some real microdata support eventually (incl. revisiting usage of data-* attributes)
    $(function () {
        var magicToken = $("input[name=__RequestVerificationToken]").first();

        //bug here
        if (!magicToken) { return; } // no sense in continuing if form POSTS will fail

        .....

the correct code:

    // UnsafeUrl links -> form POST
    //todo: need some real microdata support eventually (incl. revisiting usage of data-* attributes)
    $(function () {
        var magicToken = $("input[name=__RequestVerificationToken]").first();
        if (magicToken.size()===0) { return; } // no sense in continuing if form POSTS will fail

Coordinator
Nov 3, 2010 at 4:26 PM

Thanks for the report and patch. Could you please file this as a bug to make it easier to track? Thanks!