mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
Add htmlentities to department name
This commit is contained in:
parent
3d416f82bd
commit
a98d7ecdd1
@ -33,7 +33,7 @@ class AddDepartmentController extends Controller {
|
||||
}
|
||||
|
||||
public function handler() {
|
||||
$name = Controller::request('name');
|
||||
$name = htmlentities(Controller::request('name'));
|
||||
|
||||
$departmentInstance = new Department();
|
||||
|
||||
|
@ -85,8 +85,8 @@ class CreateController extends Controller {
|
||||
}
|
||||
|
||||
public function handler() {
|
||||
$this->title = Controller::request('title');
|
||||
$this->content = Controller::request('content', true);
|
||||
$this->title = htmlentities(Controller::request('title'));
|
||||
$this->content = htmlentities(Controller::request('content', true));
|
||||
$this->departmentId = Controller::request('departmentId');
|
||||
$this->language = Controller::request('language');
|
||||
$this->email = Controller::request('email');
|
||||
|
@ -30,7 +30,7 @@ describe'system/add-department' do
|
||||
|
||||
row = $database.getRow('department', 5, 'id')
|
||||
|
||||
(row['name']).should.equal('<b>new department</b>')
|
||||
(row['name']).should.equal('<b>new department</b>')
|
||||
|
||||
lastLog = $database.getLastRow('log')
|
||||
(lastLog['type']).should.equal('ADD_DEPARTMENT')
|
||||
|
Loading…
x
Reference in New Issue
Block a user