- Posts: 30
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Issues with regular expression in invitation emails
- arpsh
- Topic Author
- Offline
- Junior Member
Less
More
6 years 9 months ago #155229
by arpsh
Issues with regular expression in invitation emails was created 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 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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
6 years 9 months ago #155230
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Issues with regular expression in invitation emails
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:
I'm not sure whether the SMTP provider will recognize this but try:
Code:
<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.
- arpsh
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
- Thank you received: 0
6 years 9 months ago #155235
by arpsh
Replied by arpsh on topic Issues with regular expression in invitation emails
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
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.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
6 years 9 months ago - 6 years 9 months ago #155238
by DenisChenu
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.
Replied by DenisChenu on topic Issues with regular expression in invitation emails
Hi, about
are replaced by
. Then you mus use
Maybe you can try
Code:
{OPTOUTURL}
Code:
<a href="http://urltounsibsribe">http://urltounsibsribe</a>
Code:
<a href="@@OPTOUTURL@@">unsubscribe</a>
Maybe you can try
Code:
<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: 6 years 9 months ago by DenisChenu.
The following user(s) said Thank You: arpsh
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
6 years 9 months ago - 6 years 9 months ago #155243
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Issues with regular expression in invitation emails
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: 6 years 9 months ago by tpartner.
The topic has been locked.
- arpsh
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
- Thank you received: 0
6 years 9 months ago - 6 years 9 months ago #155244
by arpsh
Replied by arpsh on topic Issues with regular expression in invitation emails
Yes, I can confirm that Limesurvey sees both:
or
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!
Code:
{html_entity_decode(&#123;)}
or
Code:
&#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: 6 years 9 months ago by arpsh.
The topic has been locked.
- arpsh
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
- Thank you received: 0
6 years 9 months ago #155245
by arpsh
Replied by arpsh on topic Issues with regular expression in invitation emails
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:
Thanks to you both!
I ended up just trying it with simple escaped brackets on the open and close, which Ididn't expect to work, but it did:
Code:
<a href="\{unsubscribe:@@OPTOUTURL@@\}">unsubscribe</a>
Thanks to you both!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
6 years 9 months ago #155246
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Issues with regular expression in invitation emails
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.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
6 years 9 months ago #155247
by DenisChenu
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.
Replied by DenisChenu on topic Issues with regular expression in invitation emails
Arg,
Expression manager of limesurvey replace {html_entity_decode({)} by { and redo the it after ... Must fix this issue ! But \{unsubscribe:@@OPTOUTURL@@\} seems great too.
Maybe manual must be updated ...
Expression manager of limesurvey replace {html_entity_decode({)} 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.