Support » Plugin: Age Gate » \ caracters appearing in my age gate html code

  • Resolved arl1826

    (@arl1826)


    Hi,

    First thank you for your plugin.

    Running the latest version of WordPress 5.5.1 and Age Gate 2.10 (any other plugin or my theme are also up to date).

    Using a French keyboard, my issue may be related to the French characters ‘ and “. When I write some html, I need to use ” for example for creating a class=”something”. Or in a French sentence with ‘
    Here for instance : L\’ABUS D\’ALCOOL should be L’ABUS D’ALCOOL
    The character \ appears before ‘. Sometimes it multiplies x10 like L\\\\\\\\\\\’ABUS….
    I know that \ is used to escape ‘ and ” when saving to a database. However it should not appear in the html forms of the plugin.

    Could you please have a look into that issue?

    Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @arl1826,

    Thanks for letting me know, I’ll have a look asap 🙂

    Thanks
    Phil

    Plugin Author Phil

    (@philsbury)

    Hi @arl1826,

    Can you update to 2.10.1 and see if that fixes it for you?

    I wasn’t able to make it happen on my local environment so was flying a little blind.

    Thanks
    Phil

    arl1826

    (@arl1826)

    Thank you Phil.
    I’ve done the update and I’ve removed the \ from the following French text in the back end messaging page:

    [wpml_language_selector_footer]
    <p class=\”if-your-country\” style=\”color: white !important;\”>Si votre pays de résidence ne prévoit pas d\’âge légal, vous devez avoir 21 ans ou plus.</p>

    <p class=\”mention-legale\”>L\’ABUS D\’ALCOOL EST DANGEREUX POUR LA SANTÉ. À CONSOMMER AVEC MODÉRATION<br />
    EN ACCÉDANT À CE SITE VOUS DÉCLAREZ ACCEPTER NOS CONDITIONS GÉNÉRALES D\’UTILISATION ET AVOIR PRIS CONNAISSANCE DE NOTRE CHARTE DONNÉES PERSONNELLES ET COOKIES.</p>

    <p class=\”packaging\”>Nos emballages peuvent faire l\’objet de consigne de tri. http://www.consignesdetri.fr</p>

    I’ll let you know if the issue happens again. Did you check if there not a missing function in your code. Could you have a look at this PHP function stripslashes?

    Thanks in advance!

    Plugin Author Phil

    (@philsbury)

    Hi @arl1826,

    All the age gate messages are run through stripslashes already. I may run some tests on different database encoding, and see if that triggers it.

    But the update is a bit more aggressive with stripping them out so hopefully won’t happen again.

    Thanks
    Phil

    stephenharman

    (@stephenharman)

    Hi @philsbury, the 2.10.1 update prevents HTML from rendering from the ‘Additional content’ field.

    Plugin Author Phil

    (@philsbury)

    Hi @stephenharman,

    What’s it doing instead? I’ll have a look at it again

    Thanks
    Phil

    Plugin Author Phil

    (@philsbury)

    @stephenharman – never mind, I can see it. I’ll get it fixed

    Thanks
    Phil

    Plugin Author Phil

    (@philsbury)

    Hi @stephenharman,

    That’s fixed in 2.10.2 which is released.

    @arl1826 – can you check this doesn’t reintroduce your issue.

    Thanks
    Phil

    arl1826

    (@arl1826)

    Wow! TBH I am amazed by your reactivity!

    The issue seems to bee solved on my side. Thanks to @stephenharman as I was indeed impacted by the HTML issue of 2.10.1

    I’ll let this ticket open 2-3 days, to ensure if it is solved. I won’t forgot to come back here and mark it as solved next week.

    Have a good day!

    Hi Phil,

    The \ issue seems to be resolved, thanks!

    However I don’t understand why two links with the age gate page can’t load: “GENERAL TERMS OF USE” and “PERSONAL DATA AND COOKIES CHARTER”. It does display the URL in the address bar of the browser.

    The box “Do not age restrict this content” is ticked for both pages.

    Thanks in advance!

    ARL1826

    Plugin Author Phil

    (@philsbury)

    Ho @arl1826,

    Looks like whatever is doing the Ajax loading across the site is hijacking those links and trying to Ajax in the new content but failing.

    Couple of options I think

    • Stop them being picked up by the Ajax loader
    • or Add target="_blank" to the links
    • or Maybe switch age gate to JS mode in the the advanced settings

    Thanks
    Phil

    Hi Phil,

    Thank you, the target=”_blank” solves this issue.
    I close this ticket. Again, thanks for your prompt replies.

    5 stars rating given!

    Hi Phil,
    Unfortunately, when going back to the messaging tab in the age gate admin, I’ve got the \ coming back…
    The issue remains. They are not displayed in the html rendered in the public html, however, in the admin, it keeps adding it.
    Thanks in advance…

    Plugin Author Phil

    (@philsbury)

    Hi @arl1826,

    That’s annoying.

    Could you got to the site health part of your site and just screenshot the database section and email it to me at support@agegate.io, just want to see if it could be an encoding this that I can try and replicate. Site health should be at <yourdomain>/wp-admin/site-health.php?tab=debug

    I’ve got a release lined up for later so would be good if I can get this one knocked on the head too.

    Thanks
    Phil

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.