Changeset 11658 for lang

Show
Ignore:
Timestamp:
05/15/08 23:55:43 (5 years ago)
Author:
sasezaki
Message:

lang/php/Scraper: typeが"TEXT"指定の時に改行をなしに

Location:
lang/php/Scraper/library/Diggin/Scraper/Strategy
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/php/Scraper/library/Diggin/Scraper/Strategy/Selector.php

    r10702 r11658  
    105105            foreach ($values as $value) { 
    106106                //@todo strict  
    107                 //array_push($strings, (string) $value); 
    108                 array_push($strings, strip_tags((string) str_replace('&', '&', $value->asXML()))); 
     107                $value = strip_tags((string) str_replace('&', '&', $value->asXML())); 
     108                $value = str_replace(array(chr(10), chr(13)), '', $value); 
     109                array_push($strings, $value); 
    109110            } 
    110111        } elseif (strtoupper(($process->type)) === 'PLAIN') { 
  • lang/php/Scraper/library/Diggin/Scraper/Strategy/Xpath.php

    r11342 r11658  
    102102            foreach ($values as $value) { 
    103103                //@todo strict  
    104                 //array_push($strings, (string) $value); 
    105                 array_push($strings, strip_tags((string) str_replace('&', '&', $value->asXML()))); 
     104                $value = strip_tags((string) str_replace('&', '&', $value->asXML())); 
     105                $value = str_replace(array(chr(10), chr(13)), '', $value); 
     106                array_push($strings, $value); 
    106107            } 
    107108        } elseif (strtoupper(($process->type)) === 'PLAIN') {