这就是我所拥有的:
<?php
$textDelete = __('Delete' . ($index ? '' : ' This ' . $identifier));
$linkDelete = array('controller' => 'students', 'action' => 'delete', $id);
$confirmDelete = 'You are about to delete student:\n\n\x22'
. $student['Student']['last_name'] . ', '
. $student['Student']['first_name'] . ' '
. $student['Student']['middle_initial']
. '\x22\n\n Are you sure?';
echo $this->Html->link(
$textDelete,
$linkDelete,
array('escape' => false),
$confirmDelete
);
?>
在我们升级到CakePHP 2.4之前,它工作得很好!现在,链接的确认消息(全部)显示了\n \n和\ x22,而不是引号符号或换行,有什么想法吗?