Forums / Bug Reports / [Fixed v1.5.1] HTML Entities Converted Incorrectly in Configuration Fields

[Fixed v1.5.1] HTML Entities Converted Incorrectly in Configuration Fields

Locked

Started by numinix on 10 Sep 2012, 7:36 PM · Views: 1,083

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
10 Sep 2012, 7:36 PM
#1
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,571
Plugin Contributions:
60

[Fixed v1.5.1] HTML Entities Converted Incorrectly in Configuration Fields

If you save a configuration value with double quotes, it will store it in the database as ". If you then go to edit it, you'll see " in the field. When you save it again, it'll be stored as ". Continuing this process will creat " " and so on.

The fix I've used is to change lines 178 to 182 to the following:

      if ($cInfo->set_function) {
        eval('$value_field = ' . $cInfo->set_function . '"' . addslashes(html_entity_decode($cInfo->configuration_value)) . '");');
      } else {
        $value_field = zen_draw_input_field('configuration_value', addslashes(html_entity_decode($cInfo->configuration_value)), 'size="60"');
      }
19 Sep 2012, 2:31 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: [Fixed v1.5.1] HTML Entities Converted Incorrectly in Configuration Fields

That code suggestion didn't seem to work during testing.

However, an alternate fix was made, and included in v1.5.1, released today.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.