fix regex filter (#1845)

* fix regex filter

* fixed br to linebreak and, stlip tags.

* change to send raw content

* changed to unescape in reducer
This commit is contained in:
abcang 2017-04-16 23:33:38 +09:00 committed by Eugen
parent fc34e0e191
commit 90760eae4c
2 changed files with 7 additions and 2 deletions

View file

@ -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
}