Skip to content
Snippets Groups Projects
Commit 90e690d6 authored by Graham Cole's avatar Graham Cole
Browse files

(hopefully) fix article summary to work around newlines in the first paragraph

parent 5404bc0c
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@
$linky = "<span style=\"float: right\"><a href=\"/News/".rawurlencode($title)."\">Read More</a></span>";
$matches = array();
preg_match("/^(<p>.*?<\/p>)/", $article, $matches);
preg_match("/^(<p>.*?<\/p>)/s", $article, $matches);
$summary = preg_replace("/<\/p>/","$linky</p>", $matches[0]);
return $summary;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment