Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2008-06-30 12:25:35


Author: grafik
Date: 2008-06-30 12:25:35 EDT (Mon, 30 Jun 2008)
New Revision: 46920
URL: http://svn.boost.org/trac/boost/changeset/46920

Log:
Slightly more flexible handling of invalid html.
Text files modified:
   website/public_html/beta/common/code/boost_archive.php | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Modified: website/public_html/beta/common/code/boost_archive.php
==============================================================================
--- website/public_html/beta/common/code/boost_archive.php (original)
+++ website/public_html/beta/common/code/boost_archive.php 2008-06-30 12:25:35 EDT (Mon, 30 Jun 2008)
@@ -304,6 +304,11 @@
         }
         if (!isset($body_begin[0]))
         {
+ //~ Attempt to recover some content from illegal HTML that is missing the body tag.
+ preg_match('@<(hr|div|img|p|h1|h2|h3|h4)[^>]*>@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