symphonycms/symphony-2 — Issue #881: Tag List: Tags with quotes (") not displayed properly
Author: kanduvisla
Created: 2011-11-08 13:38:19+00:00
State: open

When I try to add a value to the tag list that has quotes, for example:

monkey, beans ("raw" beans), stove

The value displayed in my tag list is:

Beans (

This is because the quote doesn't get escaped in the `value`-attribute of the ``-box. If you look at the source, it displays as:

Changing line 173 in `field.taglist.php` from:

$label->appendChild(Widget::Input('fields'.$fieldnamePrefix.'['.$this->get('element_name').']'.$fieldnamePostfix, (strlen($value) != 0 ? $value : NULL)));

to:

$label->appendChild(Widget::Input('fields'.$fieldnamePrefix.'['.$this->get('element_name').']'.$fieldnamePostfix, (strlen($value) != 0 ? General::sanitize($value) : NULL)));

seems to fix this issue.