diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-05-07 09:30:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-07 09:30:38 +0200 |
commit | d185f3ddafc941e280de7efc6d448449ab5ce2c9 (patch) | |
tree | 1d3ee8ab74251168e98dccd7d232ed8c1a364e82 /app/javascript/mastodon/actions/notifications.js | |
parent | db012b57c2c3e65cfbd7d9b51e0c3081ed883400 (diff) |
Use plaintext value for field value tooltips in web UI (#7388)
Fix #7383
Diffstat (limited to 'app/javascript/mastodon/actions/notifications.js')
-rw-r--r-- | app/javascript/mastodon/actions/notifications.js | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index 7aa070f56..393268811 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -8,6 +8,7 @@ import { importFetchedStatuses, } from './importer'; import { defineMessages } from 'react-intl'; +import { unescapeHTML } from '../utils/html'; export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE'; export const NOTIFICATIONS_UPDATE_NOOP = 'NOTIFICATIONS_UPDATE_NOOP'; @@ -31,13 +32,6 @@ const fetchRelatedRelationships = (dispatch, notifications) => { } }; -const unescapeHTML = (html) => { - const wrapper = document.createElement('div'); - html = html.replace(/<br \/>|<br>|\n/g, ' '); - wrapper.innerHTML = html; - return wrapper.textContent; -}; - export function updateNotifications(notification, intlMessages, intlLocale) { return (dispatch, getState) => { const showInColumn = getState().getIn(['settings', 'notifications', 'shows', notification.type], true); |