FW5 and coded emails and php

Just a small point…

I noticed after upgrading a small site from FW4 to FW5 which has various email address variables being passed from page to page in hidden form field (echoed in the page with php) stopped working.

In FW4 I had carefully escaped each " in the code with a (backslash) on the page, but FW5 in the process of encoding the emails in the markup removed the backslash at the end of the email.

The workaround was to put the email at the top of the page in a variable $email rather than echoing the email in a hidden field in the page.

Just though I’d mention and pre-warn it as others might have similar issues at some stage with FW5.

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I don’t think this is to do with FW 5, I have upgraded a couple of
sites and have not noticed anything but… this might be caused by the
setting of get_magic_quotes_gpc() in your php install.

You could try stripslashes() on everything that is picked up on being
sent from one page to another, in fact it wouldn’t do any harm to
write a small function and pass everything through it that is sent
from page to page.

The following might add an escape (depending on php):
$var =$_POST[‘var’];

The following will remove it if added:
$var = stripslashes($_POST[‘var’]);

On Apr 13, 2008, at 2:37 PM, ineedwebhosting wrote:

Just a small point…

I noticed after upgrading a small site from FW4 to FW5 which has
various email address variables being passed from page to page in
hidden form field (echoed in the page with php) stopped working.

In FW4 I had carefully escaped each " in the code with a
(backslash) on the page, but FW5 in the process of encoding the
emails in the markup removed the backslash at the end of the email.

The workaround was to put the email at the top of the page in a
variable $email rather than echoing the email in a hidden field in
the page.

Just though I’d mention and pre-warn it as others might have similar
issues at some stage with FW5.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry, get_magic_quotes_gpc() might also remove an escape so you could use addslashes() rather than stripslashes(), althogh if you leave the inverted commas you may find get_magic_quotes_gpc() may just take care of things for you.

Look here:
http://es2.php.net/get_magic_quotes_gpc


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This is when the FW5 is publishing the code not when the server is executing it.

So if you have some html/php mark up in FW5 as…

echo “<input type=“hidden” name=“email"myemail@domain;”>”
FW5 publishes as…
echo “”
Note the missing at the end after FW5 has encoded the email?
David

On 13 Apr 2008, at 1:50 pm, Mike B wrote:

I don’t think this is to do with FW 5, I have upgraded a couple of
sites and have not noticed anything but… this might be caused by the
setting of get_magic_quotes_gpc() in your php install.

You could try stripslashes() on everything that is picked up on being
sent from one page to another, in fact it wouldn’t do any harm to
write a small function and pass everything through it that is sent
from page to page.

The following might add an escape (depending on php):
$var =$_POST[‘var’];

The following will remove it if added:
$var = stripslashes($_POST[‘var’]);

On Apr 13, 2008, at 2:37 PM, ineedwebhosting wrote:

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway

It seems odd the way you have constructed the name, are you not missing a value= ?, I also see a ‘;’ after the email address but within the ", yet email address are not formatted like ‘myemail@domain;’.

Try fixing these things and maybe that will sort the issue.

BTW, you could also write it as: ‘’; and not need to worry about the escapes.

On Apr 13, 2008, at 3:11 PM, David Owen wrote:

This is when the FW5 is publishing the code not when the server is executing it.

So if you have some html/php mark up in FW5 as…

echo “<input type=“hidden” name=“email"myemail@domain;”>”
FW5 publishes as…
echo “”
Note the missing at the end after FW5 has encoded the email?
David

On 13 Apr 2008, at 1:50 pm, Mike B wrote:

I don’t think this is to do with FW 5, I have upgraded a couple of
sites and have not noticed anything but… this might be caused by the
setting of get_magic_quotes_gpc() in your php install.

You could try stripslashes() on everything that is picked up on being
sent from one page to another, in fact it wouldn’t do any harm to
write a small function and pass everything through it that is sent
from page to page.

The following might add an escape (depending on php):
$var =$_POST[‘var’];

The following will remove it if added:
$var = stripslashes($_POST[‘var’]);

On Apr 13, 2008, at 2:37 PM, ineedwebhosting wrote:

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry a typo error with typing the code snippet rather than copy paste here is it again to be precise…

FW4 - output OK

echo "; "
FW5 published this same code (and encoding the email in the process) as…
echo “”;
In FW5 the last backslash after the email, is taken out by FW5 causing an error.
I have to backslash the " to stop a PHP error when echoing text on my server.
This is not a problem as I’ve fixed it by setting the variable as $email before HTML and using instead…
echo "; "
Just pointing out the issue in case others see it.

On 13 Apr 2008, at 2:21 pm, Mike B wrote:

It seems odd the way you have constructed the name, are you not missing a value= ?, I also see a ‘;’ after the email address but within the ", yet email address are not formatted like ‘myemail@domain;’.

Try fixing these things and maybe that will sort the issue.

BTW, you could also write it as: ‘’; and not need to worry about the escapes.

On Apr 13, 2008, at 3:11 PM, David Owen wrote:

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway

(RESENT)

Sorry a typo error with typing the code snippet rather than copy paste here is it again to be precise…

FW4 - output OK

echo "
; "

FW5 published this same code (and encoding the email in the process) as…

echo "
";

In FW5 the last backslash after the email, is taken out by FW5 causing an error.

I have to backslash the " to stop a PHP error when echoing text on my server.

This is not a problem as I’ve fixed it by setting the variable as $email before HTML and using instead…

echo “
;”

Just pointing out the issue in case others see it.

On 13 Apr 2008, at 2:21 pm, Mike B wrote:

It seems odd the way you have constructed the name, are you not missing a value= ?, I also see a ‘;’ after the email address but within the ", yet email address are not formatted like ‘myemail@domain;’.

Try fixing these things and maybe that will sort the issue.

BTW, you could also write it as: ‘’; and not need to worry about the escapes.

On Apr 13, 2008, at 3:11 PM, David Owen wrote:

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway

I have just stuck your code into a mark-up item in FW5, published and it looks exactly as it should… I don’t have any error, the code I used is:

<?php echo ""; ?>

On Apr 13, 2008, at 3:47 PM, David Owen wrote:

(RESENT)

Sorry a typo error with typing the code snippet rather than copy paste here is it again to be precise…

FW4 - output OK

echo "
; "

FW5 published this same code (and encoding the email in the process) as…

echo "
";

In FW5 the last backslash after the email, is taken out by FW5 causing an error.

I have to backslash the " to stop a PHP error when echoing text on my server.

This is not a problem as I’ve fixed it by setting the variable as $email before HTML and using instead…

echo “
;”

Just pointing out the issue in case others see it.

On 13 Apr 2008, at 2:21 pm, Mike B wrote:

It seems odd the way you have constructed the name, are you not missing a value= ?, I also see a ‘;’ after the email address but within the ", yet email address are not formatted like ‘myemail@domain;’.

Try fixing these things and maybe that will sort the issue.

BTW, you could also write it as: ‘’; and not need to worry about the escapes.

On Apr 13, 2008, at 3:11 PM, David Owen wrote:

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes you’re right.

Weird, when I upgrade the FW4 document (with markup) to FW5. FW5 encodes the email in question on outputting the code and misses the last slash.

But if I put the code straight into a new FW5 document its OK and FW5 does NOT encode the email. (At least on my box here)

On 13 Apr 2008, at 3:00 pm, Mike B wrote:

I have just stuck your code into a mark-up item in FW5, published and it looks exactly as it should… I don’t have any error, the code I used is:

<?php echo ""; ?>

On Apr 13, 2008, at 3:47 PM, David Owen wrote:

(RESENT)

Sorry a typo error with typing the code snippet rather than copy paste here is it again to be precise…

FW4 - output OK

echo "
; "

FW5 published this same code (and encoding the email in the process) as…

echo "
";

In FW5 the last backslash after the email, is taken out by FW5 causing an error.

I have to backslash the " to stop a PHP error when echoing text on my server.

This is not a problem as I’ve fixed it by setting the variable as $email before HTML and using instead…

echo “
;”

Just pointing out the issue in case others see it.

On 13 Apr 2008, at 2:21 pm, Mike B wrote:

It seems odd the way you have constructed the name, are you not missing a value= ?, I also see a ‘;’ after the email address but within the ", yet email address are not formatted like ‘myemail@domain;’.

Try fixing these things and maybe that will sort the issue.

BTW, you could also write it as: ‘’; and not need to worry about the escapes.

On Apr 13, 2008, at 3:11 PM, David Owen wrote:

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


David Owen
Printline Advertising
4 Chapel Hill
Yeadon
Leeds LS19 7RG
Tel: 0113 2508606
Fax: 0870 7052597
Skype: PrintlineAdv

http://www.PrintlineAdvertising.co.uk
Creative Design, Print, Copy, Web Design,

http://www.printlineAdvertising.co.uk/hosting
Web Design, Web hosting, Domain Registration

http://www.TheLogoWorks.co.uk
Logo Design, Corporate Image.

http://www.printlineadvertising.co.uk/Cat
Online Promotional Gifts Catalogue

Why not set up a page example with the same in FW4 and then transfer a
copy to FW5, if it still does the same then send a copy of the FW4
file to support at softpress outlining the issue, I have a couple of
sites with a load of php in mark-ups and other places and have not
experienced any issues moving the sites to FW5. This is not to say you
haven’t discovered something so might be good to have a go at making
an example file to check and then show softpress if it is still
happening.

Mike

On Apr 13, 2008, at 4:20 PM, David Owen wrote:

Yes you’re right.

Weird, when I upgrade the FW4 document (with markup) to FW5. FW5
encodes the email in question on outputting the code and misses the
last slash.

But if I put the code straight into a new FW5 document its OK and
FW5 does NOT encode the email. (At least on my box here)


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Something weird is going on. I’ll do a few tests and see if I can pin-point something.

On 13 Apr 2008, at 3:34 pm, Mike B wrote:

Why not set up a page example with the same in FW4 and then transfer a
copy to FW5, if it still does the same then send a copy of the FW4
file to support at softpress outlining the issue, I have a couple of
sites with a load of php in mark-ups and other places and have not
experienced any issues moving the sites to FW5. This is not to say you
haven’t discovered something so might be good to have a go at making
an example file to check and then show softpress if it is still
happening.

Mike

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway

Remember you can check the php code that FW is generating by selecting
preview.

On Apr 13, 2008, at 5:12 PM, David Owen wrote:

Something weird is going on. I’ll do a few tests and see if I can
pin-point something.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Think I’ve found it. FW5 is encoding a .co.uk email address and not a .com.

Mike can you put this is in a markup in your FW5 and see what code your FW5 makes of it?

On 13 Apr 2008, at 4:16 pm, Mike B wrote:

Remember you can check the php code that FW is generating by selecting
preview.

On Apr 13, 2008, at 5:12 PM, David Owen wrote:

Something weird is going on. I’ll do a few tests and see if I can
pin-point something.

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway

Yep, you seem to have something here:

<?php echo " "; ?>

I would send a mesage to support about this.

Mike

On Apr 13, 2008, at 5:38 PM, David Owen wrote:

Think I’ve found it. FW5 is encoding a .co.uk email address and not a .com.

Mike can you put this is in a markup in your FW5 and see what code your FW5 makes of it?

On 13 Apr 2008, at 4:16 pm, Mike B wrote:

Remember you can check the php code that FW is generating by selecting
preview.

On Apr 13, 2008, at 5:12 PM, David Owen wrote:

Something weird is going on. I’ll do a few tests and see if I can
pin-point something.

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options