Issues with regular expression in invitation emails

More
4 years 6 months ago #155229 by arpsh
I have an interesting problem - it might just be lack of knowledge, but it has me stumped!

The SMTP provider we use has started to add footers to our emails unless we have an unsubscribe link that matches their specification. Unfortunately, this is in the form of a regular expression, which Limesurvey doesn't recognise, which obviously breaks the optout link!

Original format:
<a href="{OPTOUTURL}">unsubscribe</a>.

Required format:
<a href="{unsubscribe:{OPTOUTURL}}">unsubscribe</a>.


Does anyone have any ideas how to get aorund this conundrum, for example to pass curly braces as text rather than as an expression?

Any advice greatly appreciated :)
The topic has been locked.
More
4 years 6 months ago #155230 by tpartner
If you insert a space after the opening brace and before the closing brace, Expression Manager shouldn't parse them.

I'm not sure whether the SMTP provider will recognize this but try:

<a href="{ unsubscribe:{OPTOUTURL} }">unsubscribe</a>.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: arpsh
The topic has been locked.
More
4 years 6 months ago #155235 by arpsh
Thanks Tony

Unfortunately, it looks like they don't parse it, but it was a good idea nonetheless.

What a silly little problem, but I suspect it might be intractable.

Cheers
The topic has been locked.
More
4 years 6 months ago - 4 years 6 months ago #155238 by DenisChenu
Hi, about
{OPTOUTURL}
are replaced by
<a href="http://urltounsibsribe">http://urltounsibsribe</a>
. Then you mus use
<a href="@@OPTOUTURL@@">unsubscribe</a>

Maybe you can try
<a href="{html_entity_decode(&#123;)}unsubscribe:@@OPTOUTURL@@{html_entity_decode(&#125;)}">unsubscribe</a>

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
Last edit: 4 years 6 months ago by DenisChenu.
The following user(s) said Thank You: arpsh
The topic has been locked.
More
4 years 6 months ago - 4 years 6 months ago #155243 by tpartner
I don't think that will solve it - the issue is that the SMTP provider needs to see a tag enclosed in curly braces but EM is trying to parse those braces.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 6 months ago by tpartner.
The topic has been locked.
More
4 years 6 months ago - 4 years 6 months ago #155244 by arpsh
Yes, I can confirm that Limesurvey sees both:
{html_entity_decode(&#123;)}

or
&#123;

as curly braces that it tries (unsuccesfully) to decode.


There seems to be no way to pass the curly braces as simple text without Limesurvey pricking up its ears and taking an interest (unlike for example Excel, where you can pass a wildcard character 'as is' by surrounding it by two other wildcards), at least no way I have been able to find via google!
Last edit: 4 years 6 months ago by arpsh.
The topic has been locked.
More
4 years 6 months ago #155245 by arpsh
With a push in the right direction from Tony and Denis, I think I might have sorted it - hurrah!

I ended up just trying it with simple escaped brackets on the open and close, which Ididn't expect to work, but it did:
<a href="\{unsubscribe:@@OPTOUTURL@@\}">unsubscribe</a>

Thanks to you both!
The topic has been locked.
More
4 years 6 months ago #155246 by tpartner
That's a good tip to know.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
4 years 6 months ago #155247 by DenisChenu
Arg,

Expression manager of limesurvey replace {html_entity_decode(&#123;)} by { and redo the it after ... Must fix this issue ! But \{unsubscribe:@@OPTOUTURL@@\} seems great too.

Maybe manual must be updated ... :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now