From 98e2cb33879403a2b043d724d70244369a0b8926 Mon Sep 17 00:00:00 2001 From: Kim Gardner Date: Thu, 17 Aug 2017 10:28:12 +0100 Subject: [PATCH 1/4] Version 3.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c6b8a782d..71477361e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "talk", - "version": "3.1.0", + "version": "3.2.0", "description": "A better commenting experience from Mozilla, The New York Times, and the Washington Post. https://coralproject.net", "main": "app.js", "scripts": { From 2022be41349e99a36d7bf52e120e1aacb7fb35c6 Mon Sep 17 00:00:00 2001 From: Kim Gardner Date: Thu, 17 Aug 2017 12:04:09 +0100 Subject: [PATCH 2/4] Use latest version of Talk in examples --- docs/_docs/01-02-install-docker.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_docs/01-02-install-docker.md b/docs/_docs/01-02-install-docker.md index 533f9ec16..9d177049e 100644 --- a/docs/_docs/01-02-install-docker.md +++ b/docs/_docs/01-02-install-docker.md @@ -43,7 +43,7 @@ An example docker-compose.yml: version: '2' services: talk: - image: coralproject/talk:1.5 + image: coralproject/talk:latest restart: always ports: - "5000:5000" @@ -86,7 +86,7 @@ on different machines. You can achieve this easily with docker compose: version: '2' services: talk-api: - image: coralproject/talk:1.5 + image: coralproject/talk:latest command: cli serve restart: always ports: @@ -98,7 +98,7 @@ services: - TALK_MONGO_URL=mongodb://mongo/talk - TALK_REDIS_URL=redis://redis talk-jobs: - image: coralproject/talk:1.5 + image: coralproject/talk:latest command: cli jobs process restart: always ports: From abb8b775b92c78cfcaf95ed1ca79fce2fe4937f3 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 17 Aug 2017 12:44:20 -0300 Subject: [PATCH 3/4] working banned and suspended words --- client/coral-admin/src/reducers/settings.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/coral-admin/src/reducers/settings.js b/client/coral-admin/src/reducers/settings.js index 6e29ba719..336047e5b 100644 --- a/client/coral-admin/src/reducers/settings.js +++ b/client/coral-admin/src/reducers/settings.js @@ -74,8 +74,10 @@ export default function settings (state = initialState, action) { }; case actions.WORDLIST_UPDATED: return update(state, { - wordList: { - [action.listName]: {$set: action.list}, + wordlist: { + [action.listName]: { + $set: action.list + } } }); case actions.DOMAINLIST_UPDATED: From ef815005a87f1a41526e0fd350daaca50bb9e3c5 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 17 Aug 2017 13:12:07 -0300 Subject: [PATCH 4/4] =?UTF-8?q?=C3=9Apdated=20suspected=20words?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/CommentBodyHighlighter.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/client/coral-admin/src/components/CommentBodyHighlighter.js b/client/coral-admin/src/components/CommentBodyHighlighter.js index 3b3ee3318..39be90d81 100644 --- a/client/coral-admin/src/components/CommentBodyHighlighter.js +++ b/client/coral-admin/src/components/CommentBodyHighlighter.js @@ -8,14 +8,11 @@ export default ({suspectWords, bannedWords, body, ...rest}) => { const links = linkify.getMatches(body); const linkText = links ? links.map((link) => link.raw) : []; - // since words are checked against word boundaries on the backend, - // should be the behavior on the front end as well. - // currently the highlighter plugin does not support out of the box. - const searchWords = [...suspectWords, ...bannedWords] - .filter((w) => { - return new RegExp(`(^|\\s)${w}(\\s|$)`, 'i').test(body); - }) - .concat(linkText); + const searchWords = [ + ...suspectWords, + ...bannedWords, + ...linkText + ]; return (