Closed (fixed)
Project:
Bot
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2008 at 16:01 UTC
Updated:
8 Jul 2008 at 12:13 UTC
The fix I could figure out is to replace:
$stopwords = explode("\n", variable_get('bot_factoid_stopwords', _bot_factoid_stopwords()));
to
str_replace(array("\r\n","\r"), "\n", $stopwords = explode("\n", variable_get('bot_factoid_stopwords', _bot_factoid_stopwords())));
The difference is depicted here: http://www.drupalbin.com/1922
Comments
Comment #1
Gurpartap Singh commentedI had hit submit too fast.
The issue is that when custom stopwords are entered, explode() function with "\n" as separator may not work. However, in such a case "\r\n" as a separator worked for me, although breaking the default format.
This is related to different line breaks in different OS'.
Tested entering settings under Firefox 3 + XP.
Setting status to needs review; this is not really a patch, but there could be a better fix..
Comment #2
Gurpartap Singh commentedThis one depicts the difference better: http://www.drupalbin.com/1923
Comment #3
morbus iffI've commited a version of this in DRUPAL-6--1. Please test. Thanks!
Comment #4
Gurpartap Singh commentedI just realized that the fix in the first post above has syntax error. Anyhow, this is the commit that Morbus made into the module. Might help someone landing on this page :)
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.