t1gor / Robots.txt-Parser-Class

Php class for robots.txt parse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unescaped rule or path?

JanPetterMG opened this issue · comments

This line causes some problems: if (preg_match('@' . $escaped . '@', $path)) {

Either $rule or $path is not escaped. May urlencode or rawurlencode be the solution? or will this cause any problems? (regex just isn't my expertise)

Warning: preg_match(): Compilation failed: unmatched parentheses at offset 3 in source/robotstxtparser.php on line 859

Warning: preg_match(): Compilation failed: missing ) at offset 13 in source/robotstxtparser.php on line 859

99,9999% success rate, so this has to be a rare case. Also, I don't think the responsible code has been changed lately either, the functions has been renamed and so on, but no deeper changes...