From 8d7d4980b9a9c68e3c36dc00dfc85e39842b03f7 Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 11 Jun 2020 18:39:19 +0200 Subject: StatusParser: Remove unused removeAttachmentLinks. Brings down the vendor by over 200kb --- src/services/status_parser/status_parser.js | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/services') 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 -- cgit v1.2.3-70-g09d2 From 0c364862991907ecd3073503af6b389c305fd53e Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 11 Jun 2020 18:49:39 +0200 Subject: API: Remove fetch polyfill All browser except IE have supported this for longer than Pleroma even exists. --- package.json | 3 +-- src/services/api/api.service.js | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src/services') diff --git a/package.json b/package.json index c131d21a..c0665f6e 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,7 @@ "vue-router": "^3.0.1", "vue-template-compiler": "^2.6.11", "vuelidate": "^0.7.4", - "vuex": "^3.0.1", - "whatwg-fetch": "^2.0.3" + "vuex": "^3.0.1" }, "devDependencies": { "karma-mocha-reporter": "^2.2.1", 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 */ -- cgit v1.2.3-70-g09d2