*/
public function postProcess($text)
{
- $parts = preg_split('|(\n--\s*(?:<br />)?\r?\n)|', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
- $num_parts = count($parts);
- if ($num_parts > 2) {
- return implode('', array_slice($parts, 0, -2))
- . '<span class="signature">' . $parts[$num_parts - 2]
- . $parts[$num_parts - 1] . '</span>';
+ $parts = preg_split('/(\n--\s*(?:<br \/>)?\r?\n.*?)(?=<\/?(?:div|span)|$\s)/is', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
+ $text = '';
+
+ while (count($parts)) {
+ $text .= array_shift($parts);
+ if (count($parts)) {
+ $text .= '<span class="signature">' . array_shift($parts) . '</span>';
+ }
}
return $text;
<api>beta</api>
</stability>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>* Added javscript minify filter.
+ <notes>* Fix dimming signatures when mixed with quoted text (Bug #4299).
+ * Added javscript minify filter.
* Add support for using the tidy extension when filtering HTML data.
* Initial Horde 4 package.
</notes>