diff options
| author | lain <lain@soykaf.club> | 2020-06-12 12:58:01 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-06-12 12:58:01 +0200 |
| commit | 33c1adbef4b5513605b21797860e7fd60070864c (patch) | |
| tree | c19fcc0493e3b73e31dc03e6d6ec1b60b52f13ba /src/services | |
| parent | 98819ae32c6f3962df955ee280cd6cc271625852 (diff) | |
| parent | 48365819d14d80d2aeb7174bca05bf76eee2e8e0 (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into notification-unification-experiments
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/api/api.service.js | 1 | ||||
| -rw-r--r-- | src/services/status_parser/status_parser.js | 15 |
2 files changed, 0 insertions, 16 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index b3082bc5..dfffc291 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -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 */ diff --git a/src/services/status_parser/status_parser.js b/src/services/status_parser/status_parser.js index 3d517e3c..ed0f6d57 100644 --- a/src/services/status_parser/status_parser.js +++ b/src/services/status_parser/status_parser.js @@ -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 |
