tablesorter parser img tag not working

tablesorter parser img tag not working

I have a column that either has a checkmark image tag <img src=...> or nothing and want to sort on it, so I setup a parser but it is not working, any idea what I am doing wrong?

    $.tablesorter.addParser({
        id: 'checkmark',
        is: function(s) {
            return false;
        },
        format: function(s) {
            if (s.substring(1,5)=="<img")  //also tried (s!="")
                return 1;
            else
                return 0;
        },
        type: 'numeric'
    });