2016-12-12, 09:15 PM
Hey there,
I just encountered a problem in the word filter which broke a lot of posts because I didn't know that could happen.
If the "bad word" is being used more than two times in a post and if it is being used in the replaced term as well additionally to any myCode tags, the parser does some weird iterative/recursive calls.
An example should explain that better:
It doesnt matter how mach text is between each filtered word, it still looks like that for each occurence.
I gave it some further testing and its being consistant if the replaced word is in the new term as well as any myCode tag ([.b], [.u] and so on). After the replaced word is being used more than once, the above scenario occurs.
Btw. that can be reproduced in the shoutbox (Inferno) as well.
Is there a known workaround for that or can that be fixed?
Thank you!
I just encountered a problem in the word filter which broke a lot of posts because I didn't know that could happen.
If the "bad word" is being used more than two times in a post and if it is being used in the replaced term as well additionally to any myCode tags, the parser does some weird iterative/recursive calls.
An example should explain that better:
bad word: poop
filter: [url=badword.redirect?poop]bad word[/url]
phrase: poop poop poop
expected result: bad word bad word bad word (all links)
actual result: bad word]bad word[/url] bad word bad word]bad word[/url]
It doesnt matter how mach text is between each filtered word, it still looks like that for each occurence.
I gave it some further testing and its being consistant if the replaced word is in the new term as well as any myCode tag ([.b], [.u] and so on). After the replaced word is being used more than once, the above scenario occurs.
Btw. that can be reproduced in the shoutbox (Inferno) as well.
Is there a known workaround for that or can that be fixed?
Thank you!