Forums

[Plugin: WP-reCAPTCHA] Validate the hidemail better (2 posts)

  1. mrgtb
    Member
    Posted 3 weeks ago #

    You need to replace the "&" sign with "amp" on line 252 for better W3C validation in the mailhide php file.

    This the line:

    return "http://mailhide.recaptcha.net/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);

    with this:

    return "http://mailhide.recaptcha.net/d?k=" . $pubkey . "&amp+semicolonc=" . _recaptcha_mailhide_urlbase64 ($cryptmail);

    I'm unable to post the &amp with a semicolon at the end of it, otherwise you won't see it displayed in this comment and just see another & instead. Look-up replacement for W3C validation for & and amp

    http://wordpress.org/extend/plugins/wp-recaptcha/

  2. wongo888
    Member
    Posted 3 weeks ago #

    I ran into this on another project a while back and the approach that we took was to read the separator from the php.ini file and place it into a constant then use the constant wherever you wanted a separator in a querystring. There are (a lot of) people who care less about standards conformant code. For those that do care, you can set the separator you want on a per script basis (perhaps a semicolon):

    <?php ini_set('arg_separator.output',';'); ?>

    I'm not familiar with WP enough to know where their constants are set-up, but you can read these php.ini settings using ini_get. Perhaps someone at WP already set up an application constant with this setting in it? Would it make sense to concatenate that in place of an html escaped entity?

    Separators note at W3C

Reply

You must log in to post.

About this Topic