First char stripped when using numbers

joln - September 30, 2009 - 06:59
Project:Wordfilter
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Issue tags:wordfilter
Description

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

#1

jaydub - October 2, 2009 - 08:25
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.

#2

joln - October 7, 2009 - 16:52

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

AttachmentSize
info.html_.zip 10.1 KB

#3

jaydub - October 9, 2009 - 08:20
Status:postponed (maintainer needs more info)» needs review

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.

AttachmentSize
wordfilter.module.591806.patch 1.06 KB

#4

joln - October 9, 2009 - 13:07

Yes! Worked like a charm. Many thanks.

#5

jaydub - October 12, 2009 - 19:50
Status:needs review» fixed

http://drupal.org/cvs?commit=274040

#6

System Message - October 26, 2009 - 19:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.