MDL-75656 tag: decode entities in tags element values.
This commit is contained in:
@@ -251,6 +251,13 @@ class MoodleQuickForm_tags extends MoodleQuickForm_autocomplete {
|
||||
return $this->_prepareValue([], $assoc);
|
||||
}
|
||||
|
||||
// Submitted tag data will be encoded, we want original text.
|
||||
if (array_key_exists($this->getName(), $submitValues)) {
|
||||
array_walk($submitValues[$this->getName()], static function(string &$tag): void {
|
||||
$tag = html_entity_decode($tag);
|
||||
});
|
||||
}
|
||||
|
||||
return parent::exportValue($submitValues, $assoc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user