Support > cpg1.5 language

Danish Characters Issues - UTF-8

<< < (3/3)

Αndré:
I just had a closer look at the IPTC data handling. The data will be sanitized and the function htmlentities is used to do that. Please disregard/undo my last code change suggestion.

Instead, open include/iptc.inc.php, find

--- Code: ---$data=htmlentities(strip_tags(trim($data,"\x7f..\xff\x0..\x1f")),ENT_QUOTES); //sanitize data against sql/html injection; trim any nongraphical non-ASCII character:
--- End code ---
and replace with

--- Code: ---$data=htmlspecialchars(strip_tags(trim($data,"\x7f..\xff\x0..\x1f")),ENT_QUOTES); //sanitize data against sql/html injection; trim any nongraphical non-ASCII character:
--- End code ---


I'm currently not sure if it may cause a security vulnerability.

mboesen:
With that change I get an upload error...

The first solution worked well, except for the keywords, but I can live with that ;-)

But if you figure out a better solution, I am all ears!

Αndré:

--- Quote from: mboesen on August 17, 2011, 12:10:59 pm ---With that change I get an upload error...

--- End quote ---
Please enable debug mode and post the error message.

mboesen:
Just checked up on all files and removed the dbcharset (suggested in swedish thread) from config... and now it works perfekt.

Don't know if I missed something before or just uploaded a wrong version of a file....

But it works! Great.. finally it seems that I can upgrade to 1.5.x from 1.4

Thanks alot

nemo12:
My solution for äöõü in estonian:

function strip_IPTC($data) {
    if (is_array($data)) {
        foreach ($data as $key=>$item) {
             $data[$key]=strip_IPTC($item);
        }
    } else {
      $data=mb_convert_encoding($data, 'UTF-8', 'ISO-8859-1');

added last line.

Navigation

[0] Message Index

[*] Previous page

Go to full version