Commit dcc3e241 authored by Dries's avatar Dries
Browse files

- Fixed bug #4457: make sure to cut of the teaser after the </p> tag, not
  before the </p> tag.
parent 451a9064
...@@ -177,15 +177,15 @@ function node_teaser($body) { ...@@ -177,15 +177,15 @@ function node_teaser($body) {
** we try to split at paragraph boundaries. ** we try to split at paragraph boundaries.
*/ */
if ($length = strpos($body, "<br />", $size)) { if ($length = strpos($body, "</p>", $size)) {
return substr($body, 0, $length); return substr($body, 0, $length + 4);
} }
if ($length = strpos($body, "<br>", $size)) { if ($length = strpos($body, "<br />", $size)) {
return substr($body, 0, $length); return substr($body, 0, $length);
} }
if ($length = strpos($body, "</p>", $size)) { if ($length = strpos($body, "<br>", $size)) {
return substr($body, 0, $length); return substr($body, 0, $length);
} }
......
...@@ -177,15 +177,15 @@ function node_teaser($body) { ...@@ -177,15 +177,15 @@ function node_teaser($body) {
** we try to split at paragraph boundaries. ** we try to split at paragraph boundaries.
*/ */
if ($length = strpos($body, "<br />", $size)) { if ($length = strpos($body, "</p>", $size)) {
return substr($body, 0, $length); return substr($body, 0, $length + 4);
} }
if ($length = strpos($body, "<br>", $size)) { if ($length = strpos($body, "<br />", $size)) {
return substr($body, 0, $length); return substr($body, 0, $length);
} }
if ($length = strpos($body, "</p>", $size)) { if ($length = strpos($body, "<br>", $size)) {
return substr($body, 0, $length); return substr($body, 0, $length);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment