diff options
author | abcang <abcang1015@gmail.com> | 2017-04-16 23:33:38 +0900 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-16 16:33:38 +0200 |
commit | 90760eae4c044817728859e1adf6f57930d83b98 (patch) | |
tree | 9e5d23fdf45621528fa602b3d708168cdbc9f816 /app/assets/javascripts/components/features/ui | |
parent | fc34e0e19145f0f681f19e003060f3aa4ef122d4 (diff) |
fix regex filter (#1845)
* fix regex filter * fixed br to linebreak and, stlip tags. * change to send raw content * changed to unescape in reducer
Diffstat (limited to 'app/assets/javascripts/components/features/ui')
-rw-r--r-- | app/assets/javascripts/components/features/ui/containers/status_list_container.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/features/ui/containers/status_list_container.jsx b/app/assets/javascripts/components/features/ui/containers/status_list_container.jsx index f249240d8..4c33f2b61 100644 --- a/app/assets/javascripts/components/features/ui/containers/status_list_container.jsx +++ b/app/assets/javascripts/components/features/ui/containers/status_list_container.jsx @@ -24,8 +24,10 @@ const makeGetStatusIds = () => createSelector([ if (columnSettings.getIn(['regex', 'body'], '').trim().length > 0) { try { - const regex = new RegExp(columnSettings.getIn(['regex', 'body']).trim(), 'i'); - showStatus = showStatus && !regex.test(statusForId.get('reblog') ? statuses.getIn([statusForId.get('reblog'), 'content']) : statusForId.get('content')); + if (showStatus) { + const regex = new RegExp(columnSettings.getIn(['regex', 'body']).trim(), 'i'); + showStatus = !regex.test(statusForId.get('reblog') ? statuses.getIn([statusForId.get('reblog'), 'unescaped_content']) : statusForId.get('unescaped_content')); + } } catch(e) { // Bad regex, don't affect filters } |