XPressME Integration Kit

Trac


Ignore:
Timestamp:
Aug 2, 2009, 4:40:57 PM (15 years ago)
Author:
toemon
Message:

libxml2のバグ回避の実装 fixes #195
およびシステム情報にlibxmlのバージョンを表示するようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/include/xml.php

    r42 r353  
    8585                $this->stack    = array(); 
    8686                $this->parent   = &$this->document; 
     87                 
     88                //libxml2 ver.2.7.0 -2.7.2 stripping leading angle brackets bug patch 
     89                if (  
     90                        LIBXML_DOTTED_VERSION == '2.7.0'  
     91                        || LIBXML_DOTTED_VERSION == '2.7.1'  
     92                        || LIBXML_DOTTED_VERSION == '2.7.2'  
     93                        || ( 
     94                                LIBXML_DOTTED_VERSION == '2.7.3' 
     95                                && version_compare( PHP_VERSION, '5.2.9', '<' ) 
     96                        ) 
     97                ) { 
     98                        $data =str_replace('&lt;','&#60;',$data ); 
     99                        $data =str_replace('&gt;','&#62;',$data ); 
     100                        $data =str_replace('&amp;','&#38;',$data ); 
     101                } 
     102                //end Fix 
     103                 
    87104                // return xml_parse(&$this->parser, &$data, true) ? $this->document : NULL; // GIJ 
    88105                $ret = @xml_parse($this->parser, $data, true) ? $this->document : NULL; 
Note: See TracChangeset for help on using the changeset viewer.