diff options
Diffstat (limited to '')
-rw-r--r-- | search.php | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -73,7 +73,10 @@ . escapeshellarg($query), $lines, $ret); if($ret === 0) { - $url = "$root/?query=". urlencode($query) ."&section=1&action=lmmtfy"; + preg_match('/\<td.*\>.+\((.+)\)\<\/td>/i', $lines[4], $sect); + + $url = "$root/?query=". urlencode($query) ."&section=". urlencode($sect[1]) + ."&action=lmmtfy"; /* HACK: fucking mandoc just generates tons of useless <br>s that make <code> stuff * look horrible. So I just remove it here. |