Hello,
Create badwords list as follows:
f* -> ****
f*ing -> *******
When user type f*ing, forum replace it with ****ing instead of *******.
Fix: barword list loaded from DB should be sorted by length of badword, desc:
inc_func_common.asp, line 208:
strSqlb = "SELECT B_BADWORD, B_REPLACE "
strSqlb = strSqlb & " FROM " & strFilterTablePrefix & "BADWORDS "
Replace with:
strSqlb = "SELECT B_BADWORD, B_REPLACE "
strSqlb = strSqlb & " FROM " & strFilterTablePrefix & "BADWORDS "
If strDBType = "mysql" Or strDBType = "oracle" then
strSqlb = strSqlb & "ORDER BY LENGTH(B_BADWORD) DESC "
Else
strSqlb = strSqlb & "ORDER BY LEN(B_BADWORD) DESC "
End If
register.asp, line 819:
strSqlb = "SELECT B_BADWORD, B_REPLACE "
strSqlb = strSqlb & " FROM " & strFilterTablePrefix & "BADWORDS "
Replace with:
strSqlb = "SELECT B_BADWORD, B_REPLACE "
strSqlb = strSqlb & " FROM " & strFilterTablePrefix & "BADWORDS "
If strDBType = "mysql" Or strDBType = "oracle" then
strSqlb = strSqlb & "ORDER BY LENGTH(B_BADWORD) DESC "
Else
strSqlb = strSqlb & "ORDER BY LEN(B_BADWORD) DESC "
End If
<