WordPress.org

Make WordPress Core

Changeset 8744


Ignore:
Timestamp:
08/27/08 06:54:48 (7 years ago)
Author:
westi
Message:

utf8 encode data from IPTC tags. Fixes #7495 for trunk props Txanny.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image.php

    r8612 r8744  
    220220            $iptc = iptcparse($info['APP13']); 
    221221            if ( !empty($iptc['2#110'][0]) ) // credit 
    222                 $meta['credit'] = trim( $iptc['2#110'][0] ); 
     222                $meta['credit'] = utf8_encode(trim($iptc['2#110'][0])); 
    223223            elseif ( !empty($iptc['2#080'][0]) ) // byline 
    224                 $meta['credit'] = trim( $iptc['2#080'][0] ); 
     224                $meta['credit'] = utf8_encode(trim($iptc['2#080'][0])); 
    225225            if ( !empty($iptc['2#055'][0]) and !empty($iptc['2#060'][0]) ) // created datee and time 
    226226                $meta['created_timestamp'] = strtotime($iptc['2#055'][0] . ' ' . $iptc['2#060'][0]); 
    227227            if ( !empty($iptc['2#120'][0]) ) // caption 
    228                 $meta['caption'] = trim( $iptc['2#120'][0] ); 
     228                $meta['caption'] = utf8_encode(trim($iptc['2#120'][0])); 
    229229            if ( !empty($iptc['2#116'][0]) ) // copyright 
    230                 $meta['copyright'] = trim( $iptc['2#116'][0] ); 
     230                $meta['copyright'] = utf8_encode(trim($iptc['2#116'][0])); 
    231231            if ( !empty($iptc['2#005'][0]) ) // title 
    232                 $meta['title'] = trim( $iptc['2#005'][0] ); 
     232                $meta['title'] = utf8_encode(trim($iptc['2#005'][0])); 
    233233         } 
    234234    } 
Note: See TracChangeset for help on using the changeset viewer.