mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-28 00:04:31 +02:00
Remove htmlentities, use html-to-text
This commit is contained in:
parent
5f07b85975
commit
ad7051f2e0
@ -60,6 +60,7 @@
|
|||||||
"draft-js": "^0.10.0",
|
"draft-js": "^0.10.0",
|
||||||
"draft-js-export-html": "^0.5.2",
|
"draft-js-export-html": "^0.5.2",
|
||||||
"history": "^3.0.0",
|
"history": "^3.0.0",
|
||||||
|
"html-to-text": "^4.0.0",
|
||||||
"jquery": "^2.1.4",
|
"jquery": "^2.1.4",
|
||||||
"keycode": "^2.1.4",
|
"keycode": "^2.1.4",
|
||||||
"localStorage": "^1.0.3",
|
"localStorage": "^1.0.3",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import htmlToText from 'html-to-text';
|
||||||
|
|
||||||
import i18n from 'lib-app/i18n';
|
import i18n from 'lib-app/i18n';
|
||||||
import Icon from 'core-components/icon';
|
import Icon from 'core-components/icon';
|
||||||
@ -19,7 +20,7 @@ class TicketInfo extends React.Component {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="ticket-info__description">
|
<div className="ticket-info__description">
|
||||||
{this.props.ticket.content}
|
{htmlToText.fromString(this.props.ticket.content)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="ticket-info__author">
|
<div className="ticket-info__author">
|
||||||
@ -90,4 +91,4 @@ class TicketInfo extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default TicketInfo;
|
export default TicketInfo;
|
||||||
|
@ -33,7 +33,7 @@ class AddDepartmentController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function handler() {
|
public function handler() {
|
||||||
$name = htmlentities(Controller::request('name'));
|
$name = Controller::request('name');
|
||||||
|
|
||||||
$departmentInstance = new Department();
|
$departmentInstance = new Department();
|
||||||
|
|
||||||
|
@ -85,8 +85,8 @@ class CreateController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function handler() {
|
public function handler() {
|
||||||
$this->title = htmlentities(Controller::request('title'));
|
$this->title = Controller::request('title');
|
||||||
$this->content = htmlentities(Controller::request('content', true));
|
$this->content = Controller::request('content', true);
|
||||||
$this->departmentId = Controller::request('departmentId');
|
$this->departmentId = Controller::request('departmentId');
|
||||||
$this->language = Controller::request('language');
|
$this->language = Controller::request('language');
|
||||||
$this->email = Controller::request('email');
|
$this->email = Controller::request('email');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user