linkify url in description
This commit is contained in:
@@ -77,6 +77,7 @@
|
|||||||
"jsdom": "^16.1.0",
|
"jsdom": "^16.1.0",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
"less": "^3.10.3",
|
"less": "^3.10.3",
|
||||||
|
"linkifyjs": "^2.1.9",
|
||||||
"lodash": "^4.17.14",
|
"lodash": "^4.17.14",
|
||||||
"mkdirp": "^1.0.3",
|
"mkdirp": "^1.0.3",
|
||||||
"moment-timezone": "^0.5.27",
|
"moment-timezone": "^0.5.27",
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ const fs = require('fs')
|
|||||||
const { Op } = require('sequelize')
|
const { Op } = require('sequelize')
|
||||||
const _ = require('lodash')
|
const _ = require('lodash')
|
||||||
const helpers = require('../../helpers')
|
const helpers = require('../../helpers')
|
||||||
|
const linkifyHtml = require('linkifyjs/html')
|
||||||
|
const Sequelize = require('sequelize')
|
||||||
|
|
||||||
const {
|
const {
|
||||||
event: Event,
|
event: Event,
|
||||||
@@ -15,7 +17,6 @@ const {
|
|||||||
notification: Notification,
|
notification: Notification,
|
||||||
ap_user: APUser
|
ap_user: APUser
|
||||||
} = require('../models')
|
} = require('../models')
|
||||||
const Sequelize = require('sequelize')
|
|
||||||
const exportController = require('./export')
|
const exportController = require('./export')
|
||||||
|
|
||||||
const debug = require('debug')('controller:event')
|
const debug = require('debug')('controller:event')
|
||||||
@@ -222,7 +223,7 @@ const eventController = {
|
|||||||
const eventDetails = {
|
const eventDetails = {
|
||||||
title: body.title,
|
title: body.title,
|
||||||
// remove html tags
|
// remove html tags
|
||||||
description: helpers.sanitizeHTML(body.description),
|
description: helpers.sanitizeHTML(linkifyHtml(body.description)),
|
||||||
multidate: body.multidate,
|
multidate: body.multidate,
|
||||||
start_datetime: body.start_datetime,
|
start_datetime: body.start_datetime,
|
||||||
end_datetime: body.end_datetime,
|
end_datetime: body.end_datetime,
|
||||||
@@ -296,7 +297,7 @@ const eventController = {
|
|||||||
const eventDetails = {
|
const eventDetails = {
|
||||||
title: body.title,
|
title: body.title,
|
||||||
// remove html tags
|
// remove html tags
|
||||||
description: helpers.sanitizeHTML(body.description),
|
description: helpers.sanitizeHTML(linkifyHtml(body.description)),
|
||||||
multidate: body.multidate,
|
multidate: body.multidate,
|
||||||
start_datetime: body.start_datetime,
|
start_datetime: body.start_datetime,
|
||||||
end_datetime: body.end_datetime,
|
end_datetime: body.end_datetime,
|
||||||
|
|||||||
Reference in New Issue
Block a user