Jump to content

& appearing instead of &


Guest Terry Rogers

Recommended Posts

Guest soulmanmtl

Well maybe Im missing it but there is not that many I guess cuz Ive just been on few pages and I havent seen one. By the way.... your trade survey... I would love to be able to do something like that, but Im a beginner in that field.... can you give me some tips on how? Basically, Im selling mobiles and accessories but Im also buying back old mobiles or defect ones. So I need something they would fill like that one. Do I need an HTML editor (guess so loll) and do you have any to suggest.

Link to comment
Share on other sites

I have recently installed my cart, when first installed this problem did not exist. However now, the & sign is appearing all over the place whereever I have a &.

You can see here http://www.williams.uk.com/shop/index.php.

Help would be muchly appreciated.

Hi Terry

I cant see any examples either - can you direct us to a page where it is a problem.

Regards

Ian

Link to comment
Share on other sites

Guest Paul Arden

Hi guys, OK I have the same problem but it's worse :ninja2: because I can't get euro or pound signs to display either! I've tried collating in mysql, re-entering them, directly entering them into mysql, specifying character sets in the source code and it's still not displaying. The problem started happening with the upgrade.

http://www.flytackleeurope.com

The & sign is in Terms & Conditions. And if you change to Euros it gets really interesting. :whistle:

Any help would be much appreciated.

Thanks, Paul

Wow, I've been a member for 3 years. First post :yeahhh:

Link to comment
Share on other sites

I seem to be getting the problem with £ and Euro signs too after the upgrade to version 4.3.2, something has changes somewhere with the database.

I fixed mine temporarily through phpmyadmin and edited the cubecart_currencies table directly but its not ideal. Anyone have any ideas?

Link to comment
Share on other sites

Guest Paul Arden

Hi Ausy, what did you edit in the cubecart_currencies table? I've been in there so that they show £ and € signs, but when I load the cart I still get the same problem. I've also tried setting the field to TEXT as opposed to VARBINARY. Still no joy.

Thanks, Paul

Link to comment
Share on other sites

Hi Ausy, what did you edit in the cubecart_currencies table? I've been in there so that they show £ and € signs, but when I load the cart I still get the same problem. I've also tried setting the field to TEXT as opposed to VARBINARY. Still no joy.

Thanks, Paul

When I went in to edit the table, instead of the £ and € sign it showed &pound and € so I just changed them to the correct symbol and hit Go.

I have two stores with this problem now, both with different databases and it happend after the upgrade.

Link to comment
Share on other sites

Guest Terry Rogers

A bit more info,...

It seems that it may be something to do with browsers. In Internet Explorer 8 our Browser Title shows "Trade Only Plumbing & Heating Supplies", in Mozilla Firefox (Latest Version) it shows "Trade Only Plumbing & Heating Supplies".

That may explain why some people see it fine.

Any further ideas would be appreciated!

Link to comment
Share on other sites

A bit more info,...

It seems that it may be something to do with browsers. In Internet Explorer 8 our Browser Title shows "Trade Only Plumbing & Heating Supplies", in Mozilla Firefox (Latest Version) it shows "Trade Only Plumbing & Heating Supplies".

That may explain why some people see it fine.

Any further ideas would be appreciated!

Terry

It is fine in IE8 and also Google Chrome. I have also tried it with FF 3.0.6 and that is OK as well. Just getting the very latest version 3.0.10 - what version have you tested it with ?

My guess is that possibly it is a problem with a specific version of FF although you do have other display problems with your skin between different browser that need fixing so maybe that is contributing (Chrome doesnt display the latest product text and pricing correctly)

Regards

Ian

Link to comment
Share on other sites

Guest Paul Arden

I tried that Ausy - it didn't work for me.

Anyway, good news is that Cubecart Support has fixed my £/€ problem - I'm not sure how, but I've asked and will report back! The & sign still isn't displaying in Terms & Conditions, but that's not such a big problem for me.

Cheers, Paul

Link to comment
Share on other sites

I tried that Ausy - it didn't work for me.

Anyway, good news is that Cubecart Support has fixed my £/€ problem - I'm not sure how, but I've asked and will report back! The & sign still isn't displaying in Terms & Conditions, but that's not such a big problem for me.

Cheers, Paul

Please let me know if they give you the solution, I would really apreciate it.

Link to comment
Share on other sites

Guest Paul Arden

They didn't give me the solution but they told me the problem (I know that doesn't help :whistle: )

Yes, the new security function is encoding the input with HTML. Then there is a function validHTML() being used in some places double encoding it.

Fixed my & sign anyway!

Link to comment
Share on other sites

There is a double encoding issue caused by the new security coding.

Please open includes/functions.inc.php and find:

function validHTML($var) {

	$var = htmlspecialchars($var);

	return str_replace("'", "'", $var);

}


Replace with:
function validHTML($var) {

	## prevent double encoding

	$var = html_entity_decode($var, ENT_QUOTES, 'UTF-8');

	$var = htmlspecialchars($var);

	return str_replace("'", "'", $var);

}

Link to comment
Share on other sites

Infact the issue is being caused by the fact that the ini.inc.php file thinks you have PHP5.1 regardless if you have PHP5.2?!

if (version_compare(PHP_VERSION, '5.2.0', '<')) {

	define('PHP51_MODE',true);

}

if(PHP51_MODE) {

echo "PHP 5.1";

} else {

echo "PHP 5.2";

}




I have had to change it to




if (version_compare(PHP_VERSION, '5.2.0', '<')) {

	define('PHP51_MODE',true);

} else {

	define('PHP51_MODE',false);

}

I have made alterations to fix the encoding issues for those on PHP 5.1 and for it to define the constant correctly for PHP 5.2.

Release to follow.

Link to comment
Share on other sites

Infact the issue is being caused by the fact that the ini.inc.php file thinks you have PHP5.1 regardless if you have PHP5.2?!

if (version_compare(PHP_VERSION, '5.2.0', '<')) {

				define('PHP51_MODE',true);

			}

			if(PHP51_MODE) {

			echo "PHP 5.1";

			} else {

			echo "PHP 5.2";

			}




I have had to change it to




if (version_compare(PHP_VERSION, '5.2.0', '<')) {

				define('PHP51_MODE',true);

			} else {

				define('PHP51_MODE',false);

			}




I have made alterations to fix the encoding issues for those on PHP 5.1 and for it to define the constant correctly for PHP 5.2.



Release to follow.
Hello, I guess a forum post is going to get quicker action than a proper bug report which I made, as indicated here http://bugs.cubecart.com/view.php?id=1475 on the 7th of June. I see you have now referred to this thread in the bug report. So which ini.inc.php file are we looking at here as the one in the store root does not have exactly the same code as indicated in the "before" changes. In fact it's missing a few lines. Why doesn't it look like your example which concerns me regardless of this issue as I am using CubeCart 4.3.2? I don't want to start guessing. Here is the extent of the code from my ini.inc.php that is close to what is referred to for the fix. It's from 4.3.2.

There are two solutions supplied in this thread. I see you provide one solution and then refer to the second one as being the problem, but don't mention what we should do with the first. Once again, I don't want to start guessing.

Edit: Version 4.3.3 released to address the issue.

if (version_compare(PHP_VERSION, '5.2.0', '<')) {

	   define('PHP51_MODE',true);

   }
Link to comment
Share on other sites

Guest Maclady

Hi,

Something similar is happening in v4.2.3...

produits-frana-ais/cat_10.html

should be: produits-français/cat_10.html

(note that the accented "c" is messing up only in the URL bar - it's fine in the navigation and text areas)

I had the problem with the &/&amp; and accents in 4.3.2, and this is why I re-did everything using 4.2.3. Also, I should mention that I am using the SEO Friendly URLs.

Anyone know how to fix this. I don't want to resort to using a regular "c" instead of "ç".

Thanks

Maclady

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...