Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 23. október 2026

Rozdiely pre phpPlatonLib/HTML_Content/Content.php medzi verziami 1.7 a 1.8

verzia 1.7, 2002/12/02 23:09:49 verzia 1.8, 2002/12/15 09:05:26
Riadok 168  class HTML_Content
Riadok 168  class HTML_Content
                 if (preg_match('|^\s*<!DOCTYPE ([^>]*)>|', $all_data, $matches)) {                  if (preg_match('|^\s*<!DOCTYPE ([^>]*)>|', $all_data, $matches)) {
                         $this->_data['doctype'] = trim($matches[1]);                          $this->_data['doctype'] = trim($matches[1]);
                 }                  }
                 if (preg_match('|<head([^>]*)>(.*)</head>|si', $all_data, $matches)) {                  if (preg_match('|<head([^>]*)>(.*)</head[^>]*>|si', $all_data, $matches)) {
                         $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([^>]*)>(.*)$}si', $all_data, $matches)) {                  if (preg_match('{<body([^>]*)>(.*)$}si', $all_data, $matches)) {
                         /* This will try to find closing BODY or HTML tag and if not found,                          /* 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                             content will remain till end of file although document is not
                            valid without these ending tags */                             valid without these ending tags. */
                         if (($pos = strpos($matches[2], '</body>')) !== false) {                          $matches[2] = preg_replace('|^(.*)</body.*$|si','\\1',$matches[2]);
                                 $matches[2] = substr($matches[2], 0, $pos - 1);                          $matches[2] = preg_replace('|^(.*)</html.*$|si','\\1',$matches[2]);
                         } 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]);                          $this->_data['body_attr'] = trim($matches[1]);
                 }                  }

Legend:
Odstranené z verzie1.7  
zmenené riadky
  Pridané vo verzii1.8

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok