login/post: require user to access
[minimedit.git] / article.inc.php
index d42e49823c96b2536613c806f5399194b7b6c414..541d35e9f0958b78a606ce0ec71bdd1a808f8520 100644 (file)
@@ -35,7 +35,7 @@ class ArchiveArticle
                        }
 
                        @list ($this->preface, $this->title, $this->body) =
-                               preg_split('{<h2>(.*?)</h2>\s*}', $this->raw, 2, PREG_SPLIT_DELIM_CAPTURE);
+                               preg_split('{<h2>(.*?)</h2>\s*}s', $this->raw, 2, PREG_SPLIT_DELIM_CAPTURE);
                }
        }
 
@@ -109,7 +109,7 @@ class ArchiveArticle
 
                # starting paragraph for documents without title (assumed simple/partial)
                if (strpos($this->raw, '<h2') === FALSE and preg_match('{
-                       \A <p> \s* (.*?) </p>
+                       \A (?: <div [^>]*> \s* )* <p> \s* (.*?) </p>
                }sx', $this->raw, $bodyp)) {
                        return $bodyp[1];
                }