Support » Plugin: Title and Nofollow For Links » Removing un-needed space in rel= attribute

  • Hi there,

    It seems that the plugin generates an un-needed space when selecting nofollow option. Currently, I get in html:
    rel=”nofollow ”
    instead of the expected
    rel=”nofollow”

    It seems this can be solved easily in the code in
    nofollow.js

    To solve on my site, I updated this part in nofollow.js (and nofollow.min.js):

    Replacing this block

    
                //change by "Title and Nofollow for Links" begin
                var tanfl_value = '';
                if ( inputs.tanfl.prop('checked') ) {
                    tanfl_value += 'nofollow ';
                }
                if ( inputs.tanfl_sponsored.prop('checked') ) {
                    tanfl_value += 'sponsored';
                }
                //change by "Title and Nofollow for Links" end
    

    With this:

    
                //change by "Title and Nofollow for Links" begin
                var tanfl_value = '';
                if ( inputs.tanfl.prop('checked') ) {
                    tanfl_value += 'nofollow';
                }
                if ( inputs.tanfl.prop('checked') && inputs.tanfl_sponsored.prop('checked')) {
                	tanfl_value += ' ';
                }
                if ( inputs.tanfl_sponsored.prop('checked') ) {
                    tanfl_value += 'sponsored';
                }
                //change by "Title and Nofollow for Links" end
    

    Seems to solve the problem.

    Can we consider adding this to future update?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Removing un-needed space in rel= attribute’ is closed to new replies.