diff --git a/webtools/partytool/controllers/admin_controller.php b/webtools/partytool/controllers/admin_controller.php index d81b2e6ceb3d..67ee15f7626f 100755 --- a/webtools/partytool/controllers/admin_controller.php +++ b/webtools/partytool/controllers/admin_controller.php @@ -72,6 +72,24 @@ class AdminController extends AppController { $party = $this->Party->read(); $this->set('party', $party); $this->data = $party; + $this->data['Party']['name'] = preg_replace("/&#(\d{2,5});/e", + '$this->Unicode->unicode2utf(${1})', + html_entity_decode($this->data['Party']['name'])); + $this->data['Party']['vname'] = preg_replace("/&#(\d{2,5});/e", + '$this->Unicode->unicode2utf(${1})', + html_entity_decode($this->data['Party']['vname'])); + $this->data['Party']['website'] = preg_replace("/&#(\d{2,5});/e", + '$this->Unicode->unicode2utf(${1})', + html_entity_decode($this->data['Party']['website'])); + $this->data['Party']['address'] = preg_replace("/&#(\d{2,5});/e", + '$this->Unicode->unicode2utf(${1})', + html_entity_decode($this->data['Party']['address'])); + $this->data['Party']['notes'] = preg_replace("/&#(\d{2,5});/e", + '$this->Unicode->unicode2utf(${1})', + html_entity_decode($this->data['Party']['notes'])); + $this->data['Party']['flickrusr'] = preg_replace("/&#(\d{2,5});/e", + '$this->Unicode->unicode2utf(${1})', + html_entity_decode($this->data['Party']['flickrusr'])); break; case 'comment': @@ -96,6 +114,8 @@ class AdminController extends AppController { case 'party': $this->Party->id = $id; + $clean = new Sanitize(); + $clean->cleanArray($this->data); $this->Party->save($this->data); break; diff --git a/webtools/partytool/views/admin/edit.thtml b/webtools/partytool/views/admin/edit.thtml index da16c9c70f68..1f0de31a46bd 100755 --- a/webtools/partytool/views/admin/edit.thtml +++ b/webtools/partytool/views/admin/edit.thtml @@ -1,5 +1,5 @@ -

User )

+

url('/users/view/'.$user['User']['id']).'">'.$user['User']['id']; ?>)

@@ -37,7 +37,7 @@ -

Party )

+

url('/parties/view/'.$party['Party']['id']).'">'.$party['Party']['id']; ?>)

@@ -108,7 +108,7 @@ -

Comment by url('/admin/edit/user/'.$comment['Comment']['owner']).'">'.$comment['Comment']['owner']; ?>)

+

Comment # by url('/admin/edit/user/'.$comment['Comment']['owner']).'">'.$owner; ?>