cakephp3で何か投稿してフラッシュメソッドで文字列を表示したときに、そこにリンクのタグを張りたいのですが、エスケープ処理されているようで、タグが使えません。
どうしたらよいでしょうか。
PHP
1 public function add() 2 { 3 $this->ViewBuilder()->layout('auth'); 4 5 6 $article = $this->Articles->newEntity(); 7 if ($this->request->is('post')) { 8 $article = $this->Articles->patchEntity($article, $this->request->data); 9 if ($this->Articles->save($article)) { 10 $this->Flash->success(__('投稿成功'));//ここにリンクタグを作りたい。 11 12 return $this->redirect(['action' => 'add']); 13 } else { 14 $this->Flash->error(__('投稿エラー')); 15 } 16 } 17 $users = $this->Articles->Users->find('list', ['limit' => 200]); 18 $this->set(compact('article', 'users')); 19 $this->set('_serialize', ['article']); 20 }
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。