diff --git a/module/VuFind/src/VuFind/Controller/AbstractRecord.php b/module/VuFind/src/VuFind/Controller/AbstractRecord.php index 35e07b053b1322592a6d263fc72e962f46b78be3..d49702235b28fa40371f91e63bf0103ea6ed9b06 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractRecord.php +++ b/module/VuFind/src/VuFind/Controller/AbstractRecord.php @@ -242,7 +242,10 @@ class AbstractRecord extends AbstractBase // Perform the save operation: $driver = $this->loadRecord(); - $driver->saveToFavorites($this->getRequest()->getPost()->toArray(), $user); + $post = $this->getRequest()->getPost()->toArray(); + $tagParser = $this->getServiceLocator()->get('VuFind\Tags'); + $post['mytags'] = $tagParser->parse($post['mytags']); + $driver->saveToFavorites($post, $user); // Display a success status message: $this->flashMessenger()->setNamespace('info') diff --git a/module/VuFind/src/VuFind/Controller/AjaxController.php b/module/VuFind/src/VuFind/Controller/AjaxController.php index 844f685072db6d70ddc5779c3fe6474f554dbfda..5c6a41c3c4f1f02d7671c3d99c8743f7ecb51250 100644 --- a/module/VuFind/src/VuFind/Controller/AjaxController.php +++ b/module/VuFind/src/VuFind/Controller/AjaxController.php @@ -843,7 +843,10 @@ class AjaxController extends AbstractBase $this->params()->fromPost('id'), $this->params()->fromPost('source', 'VuFind') ); - $driver->saveToFavorites($this->getRequest()->getPost()->toArray(), $user); + $post = $this->getRequest()->getPost()->toArray(); + $tagParser = $this->getServiceLocator()->get('VuFind\Tags'); + $post['mytags'] = $tagParser->parse($post['mytags']); + $driver->saveToFavorites($post, $user); return $this->output('Done', self::STATUS_OK); }