aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-06-11 17:48:15 +0000
committerShpuld Shpludson <shp@cock.li>2020-06-11 17:48:15 +0000
commit48365819d14d80d2aeb7174bca05bf76eee2e8e0 (patch)
treeb774e59a19a8f4866b61457e5cc2bc9518df1ec2 /src
parentdc7489fd8bfe9cb36358f934781c6ff4ca1e1fd0 (diff)
parent17b6396333de072d2bd271bbe88f02f266cc2d0e (diff)
Merge branch 'depatchou' into 'develop'
Remove pizza See merge request pleroma/pleroma-fe!1143
Diffstat (limited to 'src')
-rw-r--r--src/lib/persisted_state.js5
-rw-r--r--src/services/api/api.service.js1
-rw-r--r--src/services/status_parser/status_parser.js15
3 files changed, 2 insertions, 19 deletions
diff --git a/src/lib/persisted_state.js b/src/lib/persisted_state.js
index cad7ea25..8ecb66a8 100644
--- a/src/lib/persisted_state.js
+++ b/src/lib/persisted_state.js
@@ -1,13 +1,12 @@
import merge from 'lodash.merge'
-import objectPath from 'object-path'
import localforage from 'localforage'
-import { each } from 'lodash'
+import { each, get, set } from 'lodash'
let loaded = false
const defaultReducer = (state, paths) => (
paths.length === 0 ? state : paths.reduce((substate, path) => {
- objectPath.set(substate, path, objectPath.get(state, path))
+ set(substate, path, get(state, path))
return substate
}, {})
)
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