Commit Graph

13 Commits

Author SHA1 Message Date
David Taylor 39e0442de9 FIX: Various watched words improvements
- Client-side censoring fixed for non-chrome browsers. (Regular expression rewritten to avoid lookback)
- Regex generation is now done on the server, to reduce repeated logic, and make it easier to extend in plugins
- Censor tests are moved to ruby, to ensure everything works end-to-end
- If "watched words regular expressions" is enabled, warn the admin when the generated regex is invalid
2019-08-02 15:29:12 +01:00
David Taylor 3c2608d41c
FIX: Correctly censor strings starting or ending with non-word characters (#6445) 2018-10-04 15:15:10 +01:00
Joffrey JAFFEUX 03a7d532cf
DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
Neil Lalonde 3313072957 Remove censored_pattern site setting, which is replaced by watched words 2018-02-26 16:29:27 -05:00
Neil Lalonde dc97239040 FIX: censored regex words were replacing other text that shouldn't be censored 2018-01-24 12:33:47 -05:00
Neil Lalonde edb3a7f646 FIX: support for watched_words_regular_expressions when censoring words 2018-01-10 14:11:23 -05:00
Neil Lalonde ad62f1099c FIX: censored words should support * as wildcard 2018-01-09 15:53:40 -05:00
Sam 234694b50f Feature: CommonMark support
This adds the markdown.it engine to Discourse.
https://github.com/markdown-it/markdown-it

As the migration is going to take a while the new engine is default
disabled. To enable it you must change the hidden site setting:
enable_experimental_markdown_it.

This commit is a squash of many other commits, it also includes some
improvements to autospec (ability to run plugins), and a dev dependency
on the og gem for html normalization.
2017-06-23 12:01:33 -04:00
Guo Xiang Tan 0f2de4863b Make Eslint happy. 2017-01-31 10:45:04 +08:00
Guo Xiang Tan 058df4329d FIX: Escape escape regexp characters. 2017-01-31 10:39:45 +08:00
Neil Lalonde f10520a5f2 fix broken js lint 2016-11-08 17:59:51 -05:00
Neil Lalonde 86522a52b7 FEATURE: add censored_pattern setting to censor posts using regex 2016-11-08 16:39:26 -05:00
Robin Ward a546395397 REFACTOR: Migrate markdown functionality in ES6 2016-07-11 12:57:05 -04:00