<StripCharacters> and Space

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
jflowers45
Posts: 63
Joined: 11 Jul 2006, 20:52

<StripCharacters> and Space

Post by jflowers45 »

I do not have the space character in the <stripCharacters> yet it seems to be included. I'm on SFS 1.5.5 and not 1.5.8c but I didn't see anything mentioned in the release notes.

Is there a way to exclude it or will I need to write my own filtering function into my extension?

Thanks!
How you doin?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

could you tell me which characters are you stripping?
Lapo
--
gotoAndPlay()
...addicted to flash games
jflowers45
Posts: 63
Joined: 11 Jul 2006, 20:52

Post by jflowers45 »

<StripCharacters><![CDATA[,.;:_!$%&/#*-+]]></StripCharacters>
How you doin?
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Post by patso »

yep that problem is strange.

I'm using 1.5.8c and when I've tried it seems that no character is striped no matter that the BadWordsFilter is active(and it works the bad words are censored).
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

mmm... maybe there's a misunderstanding here.
The StripCharacter function specifies which characters should be stripped from the original message / name etc... before checking for bad words
It can be used to avoid that a certain "BadWord" is interspersed with other characters.

Example: B_a_d_____W_o___r_d

if you add "_" to the list of stripped chars, the bad word will be recognized.

Makes sense?
Lapo
--
gotoAndPlay()
...addicted to flash games
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Post by patso »

Yep, now make sense. Yes I've tried it and the space is not striped(on 1.5.8c) - "B_a_d_____W_o___r_d" is recognized as bad word but "B a d W o r d" is not so it doesn't strip the spaces.

jflowers45 - can you give the exact case when it doesn't work?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

I am using 1.5.8c and works okay for me!
Patso, sorry for the dumb question, did you add the " " (empty space) in the list of characters that should be stripped?
Lapo
--
gotoAndPlay()
...addicted to flash games
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Post by patso »

Lapo wrote:I am using 1.5.8c and works okay for me!
Patso, sorry for the dumb question, did you add the " " (empty space) in the list of characters that should be stripped?
I think we have some lost in translation situation :). I am also using 1.5.8c and it works.

Ok. One by one.

Lets say that the we have the word "word" in the bad words list.

I understand the jflowers45 problem that "w ord" is recognized as bad word no matter that the space(" ") is not included in <stripCharacters>.

What I mean is that when I've tried "w,o#.rd" is recognized as bad word because ",", "." and "#" are in the <stripCharacters> list. When I've tired "w ord" and "w o r d" both are NOT recognized as bad words because space(" ") is not included in <stripCharacters>. So I don't have the jflowers45 problem and for me it seems to work. Of course when I've added the space(" ") in the <stripCharacters> list both "w ord" and "w o r d" were recognized as bad words.

Sorry for not clarify this earlier but I was a little busy recently.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Thanks for the explanation!
All clear :D
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply