First char stripped when using numbers. It removes the first number. When I put a space in front of the number it works.

IE.

-aar-|2009

outputs 009

it's the same with all numbers

CommentFileSizeAuthor
#3 wordfilter.module.591806.patch1.06 KBjaydub
#2 info.html_.zip10.1 KBjoln

Comments

jaydub’s picture

Status: Active » Postponed (maintainer needs more info)

meaning that you have a wordfilter setup to replace the string '-aar-' with the number '2009'?

I want to verify that that is the case you have here.

Please provide any more detail you have so I can see what it is you are running into.

joln’s picture

Issue tags: +wordfilter
StatusFileSize
new10.1 KB

Sorry for a late answer and thanks for a great plugin.

Now, back to my issue.

With clean install drupal 6.14 and with latest dev-module of wordfilter. No other than drupa standard modules are active.

When enter a replacement word as number, olle|2009 the first char of the number get stripped. When enter a "normal" replacement word, olle|test it works fine. It also works fine with a added space in fron of the number, olle| 2009.

No other filters is on, only the wordfilter filter is active.

Let me know if I can explan it futher or if this is enough info.

Attaching phpinfo

jaydub’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.06 KB

Ok I think I can see why this is happening and from studying the PHP page for preg_replace() I think I have a fix. Can you try out the attached patch to see if it addresses your problem? Be sure to clear your cache when you try to view the node in question.

joln’s picture

Yes! Worked like a charm. Many thanks.

jaydub’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -wordfilter

Automatically closed -- issue fixed for 2 weeks with no activity.