I am attempting to insert a link into the error message displayed on a form. in my action I’v done this.
$this->view->editForm->getElement('value')->addError('this type/value combination already exists. click <a href="'
. $this->view->url(array(
'module' => 'collection',
'controller' => 'tag',
'action' => 'detail',
'id' => $tagExists->getId()
), null, true)
.'">here</a> to load the existing tag');
so what I want to see in my web browser when rendered would be
this type/value combination already exists click here to load the existing tag
and what I’m seeing is
this type/value combination already exists click <a href="/collection/tag/detail/id/9">here</a> to load the existing tag
i am not sure how to actually cause the link to render correctly in the browser. I’m assuming that there is some sort of output sanitation happening in that error decorator, but I am not sure where I should be looking.
You need to set the
escapeoption on the Errors decorator tofalse.