Encoding Bug

Locked

Started by erikallan on 27 Oct 2009, 9:15 PM · Views: 1,184

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
27 Oct 2009, 9:15 PM
#1
erikallan avatar

erikallan

New Zenner

Join Date:
Dec 2008
Location:
Stockholm
Posts:
29
Plugin Contributions:
0

Encoding Bug

Hello!

Is there any rescrictions on using special characters (ampersand, nbsp etc.) in the product/category description, titles or metatag texts?

If I try to write "Hells & Bells" as a product title it doesn't encode to "Hells & Bells" when it is sent to the browser. This makes the XHTML invalid :yuck:

If I try to write "Hells & Bells" zencart saves the text perfectly (unencoded) to the database and is also sending it correctly to the browser. But if I reedit the product, "Hells & Bells" is displayed in the textbox - and when I hit update again "Hells & Bells" is saved in the database. :yuck:

How is this supposed to work? I would consider it as a BUG.

Best Regards

/Erik

it doesn't encode to & before output on screen. This makes the XHTML invalid :yuck:

If I try to write &

27 Oct 2009, 10:05 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Encoding Bug

Use the word "and" or try the ascii codes for special characters

for the & either

&
&

Board parses the ascii

it is without the spaces

& # 3 8 ;

Zen-Venom Get Bitten

27 Oct 2009, 10:26 PM
#3
erikallan avatar

erikallan

New Zenner

Join Date:
Dec 2008
Location:
Stockholm
Posts:
29
Plugin Contributions:
0

Re: Encoding Bug

Hello and thanks for a fast reply :-)

Using the ascii codes doesn´t solve the problem. Zencart admin still encodes them back to "readable" characters when re-saving to the database.

Is there any other work around?

/Erik

27 Oct 2009, 10:54 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,701
Plugin Contributions:
0

Re: Encoding Bug

Yes, unfortunately the Admin "cleans" the text send to the database too well. This has been taken care of in the upcoming release of Zen Cart 2.0. Until then you will have to re-encode the special characters when you re-edit your text.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.