Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2008-04-02 09:05:11


Author: grafik
Date: 2008-04-02 09:05:10 EDT (Wed, 02 Apr 2008)
New Revision: 43998
URL: http://svn.boost.org/trac/boost/changeset/43998

Log:
Add logic to attempt to recover content from illegal HTML doc pages. (merge from beta)
Text files modified:
   website/public_html/live/common/code/boost_archive.php | 10 ++++++++++
   1 files changed, 10 insertions(+), 0 deletions(-)

Modified: website/public_html/live/common/code/boost_archive.php
==============================================================================
--- website/public_html/live/common/code/boost_archive.php (original)
+++ website/public_html/live/common/code/boost_archive.php 2008-04-02 09:05:10 EDT (Wed, 02 Apr 2008)
@@ -284,6 +284,16 @@
         preg_match('@</body>@i',$text,$body_end,PREG_OFFSET_CAPTURE);
         if (!isset($body_begin[0]))
         {
+ //~ Attempt to recover some content from illegal HTML that is missing the body tag.
+ preg_match('@</head>@i',$text,$body_begin,PREG_OFFSET_CAPTURE);
+ }
+ if (!isset($body_begin[0]))
+ {
+ //~ Attempt to recover some content from illegal HTML that is missing the body tag.
+ preg_match('@<html[^>]*>@i',$text,$body_begin,PREG_OFFSET_CAPTURE);
+ }
+ if (!isset($body_begin[0]))
+ {
             return;
         }
         else if (!isset($body_end[0]))


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk