修订版 | 58acbd909d8478cd483bcdde763287c155f6f49b (tree) |
---|---|
时间 | 2007-09-18 23:29:30 |
作者 | henoheno <henoheno> |
Commiter | henoheno |
preg_replace('/[\r\n]+/', , $str) before output table cell
@@ -1,6 +1,6 @@ | ||
1 | 1 | <?php |
2 | 2 | // PukiWiki - Yet another WikiWikiWeb clone |
3 | -// $Id: tracker.inc.php,v 1.55 2007-09-18 14:01:20 henoheno Exp $ | |
3 | +// $Id: tracker.inc.php,v 1.56 2007-09-18 14:29:30 henoheno Exp $ | |
4 | 4 | // Copyright (C) 2003-2005, 2007 PukiWiki Developers Team |
5 | 5 | // License: GPL v2 or (at your option) any later version |
6 | 6 | // |
@@ -302,7 +302,7 @@ class Tracker_field | ||
302 | 302 | |
303 | 303 | function format_cell($str) |
304 | 304 | { |
305 | - return $str; | |
305 | + return preg_replace('/[\r\n]+/', '', $str); | |
306 | 306 | } |
307 | 307 | |
308 | 308 | // Compare key for Tracker_list->sort() |
@@ -349,7 +349,7 @@ class Tracker_field_title extends Tracker_field_text | ||
349 | 349 | function format_cell($str) |
350 | 350 | { |
351 | 351 | make_heading($str); |
352 | - return $str; | |
352 | + return parent::format_cell($str); | |
353 | 353 | } |
354 | 354 | } |
355 | 355 |
@@ -369,7 +369,7 @@ class Tracker_field_textarea extends Tracker_field | ||
369 | 369 | |
370 | 370 | function format_cell($str) |
371 | 371 | { |
372 | - $str = preg_replace('/[\r\n]+/', '', $str); | |
372 | + $str = parent::format_cell($str); | |
373 | 373 | if (! empty($this->values[2]) && strlen($str) > ($this->values[2] + 3)) { |
374 | 374 | $str = mb_substr($str, 0, $this->values[2]) . '...'; |
375 | 375 | } |