Beispiel #1
0
 /**
  *    Accessor for plain text of page as a text browser
  *    would see it.
  *    @return string        Plain text of page.
  *    @access public
  */
 function getText()
 {
     if (!$this->_text) {
         $this->_text = SimpleHtmlSaxParser::normalise($this->_raw);
     }
     return $this->_text;
 }
Beispiel #2
0
 function testHtmlEntityTranslation()
 {
     $this->assertEqual(SimpleHtmlSaxParser::normalise('&lt;&gt;&quot;&amp;&#039;'), '<>"&\'');
 }
Beispiel #3
0
 /**
  *    Accessor for content reduced to visible text. Acts
  *    like a text mode browser, normalising space and
  *    reducing images to their alt text.
  *    @return string       Content as plain text.
  *    @access public
  */
 function getText()
 {
     return SimpleHtmlSaxParser::normalise($this->_content);
 }