Skip to content

Commit 7093b52

Browse files
committed
f
1 parent 784c467 commit 7093b52

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

hacktricks-preprocessor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def ref(matchobj):
5050
pass #nDont stop on broken link
5151
else:
5252
try:
53+
href = href.replace("`", "") # Prevent hrefs like: ../../generic-methodologies-and-resources/pentesting-network/`spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks.md`
5354
if href.endswith("/"):
5455
href = href+"README.md" # Fix if ref points to a folder
5556
if "#" in href:
@@ -74,7 +75,7 @@ def ref(matchobj):
7475
logger.debug(f'Recursive title search result: {chapter["name"]}')
7576
except Exception as e:
7677
logger.debug(e)
77-
logger.error(f'Error getting chapter title: {path.normpath(path.join(dir,href))}')
78+
logger.error(f'Error getting chapter title: {path.normpath(path.join(dir,Error getting chapter title))}')
7879
sys.exit(1)
7980

8081

0 commit comments

Comments
 (0)