honestbleeps/Reddit-Enhancement-Suite — Issue #49: Domain filtering partially broken
Author: gavin19
Created: 2011-12-31 14:59:34+00:00
State: open

Didn't want to post a patch up as you can decide for yourself how to work around it. Pursuant to [this](http://www.reddit.com/r/Enhancement/comments/nxa93/bug_filter_everything_but_not_working/) thread and a few similar ones, I had a look into why it was working on some and not others.

I *think* it's to do with the subreddit name being sent to the `filterDomain` function (~13039) not being converted to lowercase, either from `postSubreddit` or using `RESUtils.currentSubreddit()`. When this then gets passed to `arrayContainsSubstring` as `reddit` and is compared to `applyList`, it breaks on subreddits with any capitalization. I only realised when I learned that indexOf is case sensitive.

Usual form - if this is off base then quietly burn the evidence.