Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for phpPlatonLib/HTML_Content/Content.php between version 1.4 and 1.5

version 1.4, 2002/10/14 22:38:27 version 1.5, 2002/10/25 00:50:52
Line 166  class HTML_Content
Line 166  class HTML_Content
                         $this->_data['head_attr'] = trim($matches[1]);                          $this->_data['head_attr'] = trim($matches[1]);
                         $this->_data['head']      = trim($matches[2]);                          $this->_data['head']      = trim($matches[2]);
                 }                  }
                 if (preg_match('{<body([^>]*)>(.*)(</body>|</html>|$)}si', $all_data, $matches)) {                  if (preg_match('{<body([^>]*)>(.*)$}si', $all_data, $matches)) {
                         $this->_data['body_attr'] = trim($matches[1]);                          /* This will try to find closing BODY or HTML tag and if not found,
                              content will remain till end of file although document is not
                              valid without these ending tags */
                           if (($pos = strpos($matches[2], '</body>')) !== false) {
                                   $matches[2] = substr($matches[2], 0, $pos - 1);
                           } elseif (($pos = strpos($matches[2], '</html>')) !== false) {
                                   $matches[2] = substr($matches[2], 0, $pos - 1);
                           }
                         $this->_data['body']      = trim($matches[2]);                          $this->_data['body']      = trim($matches[2]);
                           $this->_data['body_attr'] = trim($matches[1]);
                 }                  }
                 if ($this->_data['head'] == '' && $this->_data['body'] == '') {                  if ($this->_data['head'] == '' && $this->_data['body'] == '') {
                         $this->_data['body'] = $all_data;                          $this->_data['body'] = $all_data;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top