Open Journal Systems  3.3.0
SearchHTMLParser.inc.php
1 <?php
2 
17 import('lib.pkp.classes.search.SearchFileParser');
18 import('lib.pkp.classes.core.PKPString');
19 
21 
22  function doRead() {
23  // strip HTML tags from the read line
24  $line = fgetss($this->fp, 4096);
25 
26  // convert HTML entities to valid UTF-8 characters
27  $line = html_entity_decode($line, ENT_COMPAT, 'UTF-8');
28 
29  // slightly (~10%) faster than above, but not quite as accurate, and requires html_entity_decode()
30 // $line = html_entity_decode($line, ENT_COMPAT, strtoupper(Config::getVar('i18n', 'client_charset')));
31 
32  return $line;
33  }
34 }
35 
36 
SearchFileParser
Abstract class to extract search text from a given file.
Definition: SearchFileParser.inc.php:23
SearchHTMLParser\doRead
doRead()
Definition: SearchHTMLParser.inc.php:22
SearchHTMLParser
Class to extract text from an HTML file.
Definition: SearchHTMLParser.inc.php:20