As many of you know by now - if you type a1ert into a forum post (Note- I am using the number 1 in place of the lower case l) - then all the content after the aforesaid word is removed.
See the following Gemini Posts:
DNN-8220 DotNetNuke.PortalSecurity.FilterString truncates posts based on the word 'a1ert'
FOR-7206 Forums module: the word "a1ert" disapears in Forum posts and subject
DNN- 7215 Page names containing the word "a1ert" become uneditable in 4.8.2
The problem was that a Regex filter introduced as part of a Security fix to remove any potential use of the javascript a1ert function was too agressive.
The Regex was as follows:
a1ert.*\(?'?""?'?""?\)?
The problem with this Regex is that after the t there is .* - the . indicates any character and the * indicates 0-n, so anytext after the offending word was also matched and removed.
The goal of the Regex is to remove use-cases where the word is used as javascript but NOT the normal use of the word.
After much fighting with Regex today - it is not my favourite language - I figured out the correct Regex to use:
a1ert[\s(nbsp; )]*\([\s(nbsp; )]*'?[\s(nbsp; )]*"?[\s( nbsp;)]*'?[\s(nbsp; )]*"?[\s(nbsp; )]*\)
The main change is to use \s (ie any white space) rather than . (any character).
In addition we have to include the HTML Entity nbsp; (actually this is preceded by an & in the actual regex, but the editor displays this as a "space" ) as possible white space as the FCK Editor will replace extra spaces by .
Anyway - to cut a long story short, the new filter will trap
- a1ert ( )
- a1ert ( ' ' )
- a1ert ( "")
and any combination with variable whitespace (0-n).
but NOT a1ert when used in a normal word.
As this is a long standing annoyance I have checked this into the 4.9.0 codebase so it will be fixed in the 4.9.0 Release.