View Issue Details

IDProjectCategoryView StatusLast Update
0016671phplist applicationMessage Send Processpublic26-08-12 17:31
Reporterdanjfoley 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version2.11.7 
Summary0016671: Square brackets get removed in code - conditional comments are broken.
DescriptionIf you are using conditional comments - which is a huge deal to make stuff working in Outlook and other old IE browser, content in square brackets will get removed. The system thinks it's a placeholder and gets rid of it.
Steps To ReproducePut in some conditional comments or anything in square brackets in your email that is not a placeholder. You'll see that it is GONE from the message when sent.
Additional InformationWe have to come with a way to let people put square brackets in the email when they need to. A good idea would be make people double them up.

Thus:
<![endif]-->

could be entered as

<![[endif]]-->

And they system would know to render it as

<![endif]-->

Right now i'm removing 564 and 565 of sendemaillib.php as such

## remove any existing placeholders
#$htmlmessage = eregi_replace("\[[A-Z\. ]+\]","",$htmlmessage);
#$textmessage = eregi_replace("\[[A-Z\. ]+\]","",$textmessage);

I think the regex could be changed to remove all placeholders and just remove the extra [ and ] from doubled brackets.

Anyone have a better idea?
TagsNo tags attached.

Activities

danjfoley

10-08-12 03:28

reporter   ~0051701

if we agree double square is the way to go, or whatever we agree on i'd be glad to code the fix myself. Let me know.

duncanc

23-08-12 18:40

developer   ~0051702

The problem is that, after processing placeholders, the code removes anything remaining between square brackets. I guess it thinks that they are unrecognised placeholders.
The simplest change is just not to remove those. This is actually more useful as if a placeholder has been mis-spelt then it remains in the message body.

danjfoley

23-08-12 19:02

reporter   ~0051703

Then the 2 lines that i removed should be removed from the code. I agree it could be more useful to notice when you misspelled a placeholder.

michiel

26-08-12 17:30

manager   ~0051706

Yes, I agree, let's simply not do a "clean up". I'll do this in 2.11

michiel

26-08-12 17:31

manager   ~0051707

rev3348