douwo8140 2015-05-11 18:20
浏览 31
已采纳

如何从html帮助器返回html解码文本? cakephp 3.x

I am use this.

echo  html_entity_decode(
      $this->Form->postLink( '<i class="fa fa-fw fa-remove"></i>Delete',
                             ['action' => "delete",$item->id],
                             ['confirm' => 'Are you sure?'])
      );

No problems here but I want to don't use html_entity_decode. Do you have another solution?

echo     $this->Form->postLink( '<i class="fa fa-fw fa-remove"></i>Delete',
                                 ['action' => "delete",$item->id],
                                 ['confirm' => 'Are you sure?']);

Result: <i class="fa fa-fw fa-remove"></i>Delete

  • 写回答

1条回答 默认 最新

  • dongnuo2879 2015-05-11 21:02
    关注
    echo     $this->Form->postLink( '<i class="fa fa-fw fa-remove"></i>Delete',
                                 ['action' => "delete",$item->id],
                                 ['confirm' => 'Are you sure?','escape'=>false]);
    

    You could correct with this params

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?