Open Source & Stuff  
  |     Main Site     |      Forum     |     Contact     |
Ajax Linked Select boxes :  forum.Salix.gr forum.Salix.gr
Comments, questions, usage, bugs. 
Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
messageEncoding problem on HTML endoded field
Posted by: demorex6 (IP Logged)
Date: March 06, 2009 01:45PM

Hi!
sorry for bad english! i'm frenc!
I'm using Ajax linked select boxes classe, and in my database i have encoded somme character with htmlentities():
é => é
à => à

Usualy i use "htmlentities" to encode before insertion on database and i use "html_entity_decode" to decode accented characters.
So where should i put html_entity_decode to get good view on select box (réné => réné)?
Thanks.

messageRe: Encoding problem on HTML endoded field
Posted by: panos (IP Logged)
Date: March 19, 2009 09:15AM

Hi,

sorry for late response but i was recovering from a surgury.

Fast to the point. Actualy there are 2 places you should put the html decode
Both in file sc_classes.php.
First around line 175 (class sc_form_elements function add_select_box)
line looks like
$line .= '>'.$text.'</option>';
$text is the text you have to do your decoding.
Second, near the bottom of the file, arround line 1009, function ajax_output_xml
line looks like
print '<item>'.addslashes(htmlspecialchars($text)).'</item>';
again $text is your text. But be aware that here its placed in xml file to be send to client.

Hope I wasnt too late and that i helped
Best regards
Panos



Sorry, only registered users may post in this forum.

All Rights Reserved 2006 Salix.gr  |  Design by Ades Design |  Hosting by e-emporio |  forum.Salix.gr powered by Phorum