Skip to content

Commit

Permalink
FP fix for tcl.tk
Browse files Browse the repository at this point in the history
Exclude the main TCL site from the *.tk answer regexes
  • Loading branch information
tripleee committed Nov 15, 2017
1 parent f3ef892 commit a40ec5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions findspam.py
Expand Up @@ -857,7 +857,7 @@ class FindSpam:
'reason': "pattern-matching website in {}", 'title': True, 'body': True, 'username': True,
'stripcodeblocks': False, 'body_summary': True, 'max_rep': 1, 'max_score': 0},
# The TLDs of Iran, Pakistan, and Tokelau in answers
{'regex': r'(?i)http\S*\.(ir|pk|tk)[/"<]', 'all': True,
{'regex': r'(?i)http\S*(?<![/.]tcl)\.(ir|pk|tk)[/"<]', 'all': True,
'sites': [], 'reason': "pattern-matching website in {}", 'title': True, 'body': True, 'username': True,
'stripcodeblocks': False, 'body_summary': True, 'max_rep': 1, 'max_score': 0, 'questions': False},
# Suspicious health-related websites, health sites are exempt
Expand Down Expand Up @@ -901,7 +901,7 @@ class FindSpam:
'sites': [], 'reason': 'bad keyword with a link in {}', 'title': False, 'body': True, 'username': False,
'stripcodeblocks': False, 'body_summary': False, 'questions': False, 'max_rep': 1, 'max_score': 0},
# non-linked .tk site at the end of an answer
{'regex': r'(?is)\w{3}\.tk(?:</strong>)?\W*</p>\s*$', 'all': True,
{'regex': r'(?is)\w{3}(?<![/.]tcl)\.tk(?:</strong>)?\W*</p>\s*$', 'all': True,
'sites': [], 'reason': 'pattern-matching website in {}', 'title': False, 'body': True, 'username': False,
'stripcodeblocks': False, 'body_summary': False, 'questions': False, 'max_rep': 1, 'max_score': 0},
# non-linked site at the end of a short answer
Expand Down

0 comments on commit a40ec5b

Please sign in to comment.