remove htmlToText from client
This commit is contained in:
parent
1fbf746e6c
commit
f4ca625fea
2 changed files with 4 additions and 3 deletions
|
@ -187,8 +187,6 @@ import EventAdmin from '@/components/eventAdmin'
|
|||
import EmbedEvent from '@/components/embedEvent'
|
||||
import EventMapDialog from '@/components/EventMapDialog'
|
||||
|
||||
const { htmlToText } = require('html-to-text')
|
||||
|
||||
import { mdiArrowLeft, mdiArrowRight, mdiDotsVertical, mdiCodeTags, mdiClose, mdiMap,
|
||||
mdiEye, mdiEyeOff, mdiDelete, mdiRepeat, mdiLock, mdiFileDownloadOutline, mdiShareAll,
|
||||
mdiCalendarExport, mdiCalendar, mdiContentCopy, mdiMapMarker, mdiChevronUp, mdiMonitorAccount, mdiBookmark } from '@mdi/js'
|
||||
|
@ -311,7 +309,7 @@ export default {
|
|||
return this.event.media && this.event.media.length
|
||||
},
|
||||
plainDescription () {
|
||||
return htmlToText(this.event.description && this.event.description.replace('\n', '').slice(0, 1000))
|
||||
return this.event.plain_description || ''
|
||||
},
|
||||
currentAttachmentLabel () {
|
||||
return get(this.selectedResource, `data.attachment[${this.currentAttachment}].name`, '')
|
||||
|
|
|
@ -9,6 +9,7 @@ const { DateTime } = require('luxon')
|
|||
const helpers = require('../../helpers')
|
||||
const Col = helpers.col
|
||||
const notifier = require('../../notifier')
|
||||
const { htmlToText } = require('html-to-text')
|
||||
|
||||
const { Event, Resource, Tag, Place, Notification, APUser } = require('../models/models')
|
||||
|
||||
|
@ -181,6 +182,8 @@ const eventController = {
|
|||
event.next = next && (next.slug || next.id)
|
||||
event.prev = prev && (prev.slug || prev.id)
|
||||
event.tags = event.tags.map(t => t.tag)
|
||||
event.plain_description = htmlToText(event.description, event.description.replace('\n', '').slice(0, 1000) )
|
||||
|
||||
if (format === 'json') {
|
||||
res.json(event)
|
||||
} else if (format === 'ics') {
|
||||
|
|
Loading…
Reference in a new issue