Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into notification-unification-experiments
This commit is contained in:
commit
33c1adbef4
9 changed files with 47 additions and 142 deletions
|
@ -1,6 +1,5 @@
|
|||
import { each, map, concat, last, get } from 'lodash'
|
||||
import { parseStatus, parseUser, parseNotification, parseAttachment } from '../entity_normalizer/entity_normalizer.service.js'
|
||||
import 'whatwg-fetch'
|
||||
import { RegistrationError, StatusCodeError } from '../errors/errors'
|
||||
|
||||
/* eslint-env browser */
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
import { filter } from 'lodash'
|
||||
import sanitize from 'sanitize-html'
|
||||
|
||||
export const removeAttachmentLinks = (html) => {
|
||||
return sanitize(html, {
|
||||
allowedTags: false,
|
||||
allowedAttributes: false,
|
||||
exclusiveFilter: ({ tag, attribs }) => tag === 'a' && typeof attribs.class === 'string' && attribs.class.match(/attachment/)
|
||||
})
|
||||
}
|
||||
|
||||
export const parse = (html) => {
|
||||
return removeAttachmentLinks(html)
|
||||
}
|
||||
|
||||
export const muteWordHits = (status, muteWords) => {
|
||||
const statusText = status.text.toLowerCase()
|
||||
|
@ -22,5 +9,3 @@ export const muteWordHits = (status, muteWords) => {
|
|||
|
||||
return hits
|
||||
}
|
||||
|
||||
export default parse
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue