Get error when clicking on a link with a "&" in the URL address

  • Issue description: get error when clicking on a link with a “&” in the URL address.. when i ask the bot “how can I give” to the church, it gives me the “Give Securely” link, but when i click on it, it gives an error when opening the page “Error, invalid account.” I think this may be due to it inserting “&amp:” in the URL.

  • Link to the page with the widget in question: https://5823d2fd009d46a78c0922189549828b.elf.site/

2 Likes

Hi there, @Adam_Wood and welcome to the Community :waving_hand:

I’ve tried to remove amp from the link, but it still doesn’t work. Could you please send me the correct link that should be used by the bot?

1 Like

Should be:
https://www.churchteams.com/m/Give.asp?oID=16176&aID=RUMvTGZzV0J0MlN2MTQ3RFdlSjVzNEFIOTR3VytFYWc%3D

1 Like

Hey @Adam_Wood,

I hope you don’t mind me chiming in.

When I removed “amp;” from your AI Chatbot link, it worked (see below). Do you know what is adding “amp;” to your link? Perhaps you can re-train the AI Chatbot to use the correct link.

Cheerio!

1 Like

Thank you @Petar_Dietrich yes I noticed this also. I did try retraining it, but it’s still happening. Something is changing the url by adding those extra characters and I don’t know why. So I was hoping someone else may have seen the same issue before.

1 Like

Hey @Adam_Wood,

After a bit of research, it appears the issue may be caused by the way Elfsight’s AI Chatbot widget code handles the ampersand “&” symbol before generating its output.

Meaning, when the AI Chatbot engine decides to provide a link, it might be generating the HTML entity for the ampersand (“& amp;”) inside the URL parameters, rather than the literal ampersand (“&”). This is something that, most likely, will have to be investigated by Elfsight’s developers.

In the meantime, as a potential solution, go to your AI Chatbot settings panel (Training > Agent Instructions) and enter the following:

When generating a hyperlink, you must use the literal ampersand symbol (&) to separate URL parameters, not the HTML entity (&). All URLs must be standard format.

After your bot is trained, click publish, logout from Elfsight, clear all cache, then log back in and give it another try.

Let me know if that works.

Cheerio!

1 Like

Hi there, @Adam_Wood :waving_hand:

Thanks for sharing the link!

I’ve forwarded the issue to the devs and will update you once it’s fixed :slightly_smiling_face:

1 Like

Ok thanks. I did try giving it explicit instructions to not put in the “amp” characters in URL’s but it didn’t work.

3 Likes

Hi @Adam_Wood :waving_hand:

Thank you for waiting!

While our devs are working on a global solution, we’ve applied a temporary fix to your widget. I’ll update you once the global solution is released :wink:

1 Like

Ok great! Thank you very much

2 Likes

You’re always welcome!

By the way, we’d like to invite you to participate in our Christmas Giveaway, where you can win a 3-month extension for your subscription - Christmas Giveaway: Win 3 FREE Months (10 winners) + 1 month guaranteed! 🎁

Check the details and join in :wink:

1 Like

Hi @Max,

Can you share the temporary solution? Also, any updates (anticipated release date) for the permanent solution?

Thank you!

2 Likes

Hi @Petar_Dietrich :waving_hand:

The issue has just been globally resolved for all widgets, so you don’t have to do anything additionally on your end :slightly_smiling_face:

1 Like