Changeset 7271
- Timestamp:
- May 18, 2008, 7:37:31 PM (15 years ago)
- Location:
- OpenPNE/trunk/webapp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/trunk/webapp/lib/smarty_plugins/modifier.t_truncate.php
r4933 r7271 12 12 * @param string $etc 13 13 * @param int $rows 14 * @param bool $is_htmlspecialchars 14 15 * @return string 15 16 */ 16 function smarty_modifier_t_truncate($string, $width = 80, $etc = '', $rows = 1 )17 function smarty_modifier_t_truncate($string, $width = 80, $etc = '', $rows = 1, $is_htmlspecialchars = true) 17 18 { 18 19 $rows = (int)$rows; … … 61 62 $string = implode("\n", $result); 62 63 63 return nl2br(htmlspecialchars($string, ENT_QUOTES, 'UTF-8')); 64 if ($is_htmlspecialchars) { 65 $string = htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); 66 } 67 68 return nl2br($string); 64 69 } 65 70 -
OpenPNE/trunk/webapp/templates/mail/m_ktai_message_zyushin.tpl
r7096 r7271 8 8 ({if $subject}) 9 9 件名: 10 ({$subject|t_truncate:50:"..." })10 ({$subject|t_truncate:50:"...":1:0}) 11 11 ({/if}) 12 12 13 13 ({if $body}) 14 14 本文: 15 ({$body|t_truncate:150:"..." })15 ({$body|t_truncate:150:"...":1:0}) 16 16 ({/if}) 17 17
Note: See TracChangeset
for help on using the changeset viewer.