content in square brackets

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

content in square brackets

Postby pauln » 12:08am, Thu 13 Apr, 2006

If you have anything in square brackets in the content of a message, PHPlist filters it out when the message is sent. How do you prevent this?

Thanks,
Paul N.
pauln
phpLister
 
Posts: 6
Joined: 2:53pm, Tue 06 Sep, 2005

Postby bevan » 3:37am, Mon 17 Apr, 2006

Interesting problem. Create an issue in the mantis about it as a feature request/tweak. thanks :)
bevan
PL Master
 
Posts: 465
Joined: 8:07pm, Sun 05 Feb, 2006
Location: Buenos Aires, Argentina

Postby pauln » 10:19am, Tue 18 Apr, 2006

I can't get past the 'select project' form at
http://mantis.tincan.co.uk/login_select ... t_page.php

P.
pauln
phpLister
 
Posts: 6
Joined: 2:53pm, Tue 06 Sep, 2005

Postby Totto » 9:29pm, Thu 20 Apr, 2006

pauln wrote:I can't get past the 'select project' form at
http://mantis.tincan.co.uk/login_select ... t_page.php

P.

Just have to sign up first. Then login and you'll have access to the system and be able to go on.
To all forum users: Search the forums when you got a question first! Your question may have already been asked many times before and also many times answered. The search feature is your best friend on any forums of this kind!
Totto
PL Master
 
Posts: 370
Joined: 11:20pm, Tue 31 Jan, 2006

Postby phpfan » 4:54am, Thu 30 Nov, 2006

In the HTML version, using the HTML codes for left square bracket ([) and right square bracket (]) works.

Don't know what to do about the plain text. You would think you could use any characters in the plain text.
phpfan
phpLister
 
Posts: 10
Joined: 8:08pm, Sat 08 Apr, 2006
Location: Maryland, USA

Postby Hernol » 3:00pm, Thu 30 Nov, 2006

It's because of the placeholders check this out (I feel like a rap singer)
http://mantis.tincan.co.uk/view.php?id=6178
Hernol
Admin
 
Posts: 1378
Joined: 6:39pm, Thu 18 May, 2006
Location: Argentina

Postby phpfan » 3:32pm, Thu 30 Nov, 2006

Yes, we understand it's because of the placeholders....in the HTML version of the message. But there aren't any placeholders in the plain text message. Why should square brackets be a problem in plain text?
phpfan
phpLister
 
Posts: 10
Joined: 8:08pm, Sat 08 Apr, 2006
Location: Maryland, USA

Postby Hernol » 5:35pm, Thu 30 Nov, 2006

Becuase placeholders also work in text messages.
Hernol
Admin
 
Posts: 1378
Joined: 6:39pm, Thu 18 May, 2006
Location: Argentina

Postby phpfan » 5:44pm, Thu 30 Nov, 2006

Hmmm. OK, I guess I missed that nuance in the manual.

Too bad you can't use the character codes in plain text like you can in HTML. I've used curly braces for square brackets in the plain text. It doesn't look too bad.
phpfan
phpLister
 
Posts: 10
Joined: 8:08pm, Sat 08 Apr, 2006
Location: Maryland, USA

Postby Lappert » 4:40pm, Sat 07 Jul, 2007

Just wondering if there's been any progress on solving this issue. We discovered this to be a problem in a large html mailing where we quoted a legal document:

...for the New York City Primary Metropolitan Statistical Area pursuant to Section 8(c) (1) of the United States Housing Act of 1937 (42 U.S.C. section 1437f [c] [1]) and 24 C.F.R. Part 888, ....

...where such legal documents frequently use square brackets. It doesn't seem to care what's within the square bracket. Here, each user had their email address inserted in the email they received, and understandably, more than a few people were asking questions. Luckily they only saw their email and not that of other list members.

Is there a way to restrict the use of square bracket filtering to just the systemwide variables plus a defined list of custom placeholders?
Lappert
PL Nut
 
Posts: 44
Joined: 3:32pm, Thu 14 Sep, 2006

Re: content in square brackets

Postby Beowulfde » 1:37pm, Sat 26 Mar, 2011

Bump....

I wanted to see here if anyone has a module or if there is anything in the development phase that would allow a fix to this issue. It's becoming a big problem here.

Why wouldn't we allow the administrator of the system to set up custom field identifiers? Or even move to a simple double bracket approach ... such as.. [[variable]] that would fix my problems easily.
Beowulfde
phpLister
 
Posts: 5
Joined: 6:06pm, Sun 19 Sep, 2010

Re: content in square brackets

Postby tiberio » 11:17pm, Tue 07 Jun, 2011

Me too.
I meet your problem (square brackets one) inserting IE conditional comments.

I insert:
<!--[if gte IE 1]>
<style type="text/css">
#larghezzaIE {width: "700px"}
</style>
<![endif]-->


phplist sends:
<!--[if gte IE 1]>
<style type="text/css">
#larghezzaIE {width: "700px"}
</style>
<!-->

I feel your solutions good! Twin brakets can solve problem, custom chars too; one solution more: look at what square brackets are containing and ... if phplist know that as a field value that, if phplist doesn't know it... don't touch!!! keep brackets and content too.

Btw I think "twin bracket" solution is the easiest. It involves two possible solutions:
a) use twin brackets for placeholder and single brackets for square bracketed content
b) inverted: twin brackets for content to show "inside square bracket"


Ciao
tiberio
phpList newbie
 
Posts: 2
Joined: 11:03pm, Tue 07 Jun, 2011

Re: content in square brackets

Postby tiberio » 9:18am, Sun 10 Jul, 2011

b) inverted: twin brackets for content to show "inside square bracket"

that's the best and easier solution: it's fully compatible with previous versions (single brackets are interpreted as before) and fully usable. If someone want to use this feature (improvement) can do it, other people can use new phplist version without mods.

Bye
tiberio
phpList newbie
 
Posts: 2
Joined: 11:03pm, Tue 07 Jun, 2011

Re: content in square brackets

Postby thefd2 » 9:10pm, Wed 06 Jun, 2012

Bump.

Does anyone have a solution to this?

I am trying to use code something like:
Code: Select all
<table>
  <TBODY>
<tr>
<td width="560" height="201" background="http://placehold.it/560x201">
    <!--[if gte mso 9]>
    <v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage"  src="http://placehold.it/560x201" style="behavior:url(#default#VML);display:inline-block;position:absolute;height:201px; width:560px; top:0; left:0; border-width:0; z-index:1;" />
    <v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style="behavior:url(#default#VML); display:inline-block; position:absolute; height:201px; width:560px; top:-5; left:-10; border-width:0; z-index:2;" >
    <div>
    <![endif]-->
      <table width="560" cellpadding="0" cellspacing="0" border="0">
     <TBODY>
          <tr>
            <td width="560" height="201" valign="top">
                  <p align="center" style="margin-top:0px; margin-bottom:12px;">This is my background.  All content within this VML shape must stay within the size of the VML object (560 x 201).  Use this nested table to create proper margins/spacing for inside elements.</p>
            </td>
        </tr>
      </TBODY>
     </table>
    <!--[if gte mso 9]>
    </div>
    </v:shape>
    <![endif]-->
</td>
  </tr>
  </tbody>
</table>

Every time I send the email, the [endif] gets removed and the whole thing breaks.

Suggestions?
thefd2
phpList newbie
 
Posts: 2
Joined: 9:06pm, Wed 06 Jun, 2012

Re: content in square brackets

Postby thefd2 » 10:47pm, Wed 06 Jun, 2012

I have found a fix for this problem.

I have commented out lines 563 and 564 of sendemaillib.php in admin folder. I think this means that unless an attribute is set, the code will ignore anything in the square brackets. So the code <![endif]--> gets left intact.

NOTE: the problem with this is if you mistype an attribute (i.e. [firsttname]) then the code will miss that out as an attribute and print your typo exactly as is, in the email.

If anyone sees a potential issue with this fix, I would be grateful if you would let me know.
thefd2
phpList newbie
 
Posts: 2
Joined: 9:06pm, Wed 06 Jun, 2012

Next

Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 5 guests