diff --git a/src/General/Build.coffee b/src/General/Build.coffee
index e5cacf910..0b76f84e1 100755
--- a/src/General/Build.coffee
+++ b/src/General/Build.coffee
@@ -139,13 +139,15 @@ Build =
id: "pc#{postID}"
$.extend container, wholePost
- # Fix pathnames
+ # Fix quotelinks
for quote in $$ '.quotelink', container
href = quote.getAttribute 'href'
if (href[0] is '#') and !(Build.sameThread boardID, threadID)
quote.href = "/#{boardID}/thread/#{threadID}" + href
else if (match = href.match /^\/([^\/]+)\/thread\/(\d+)/) and (Build.sameThread match[1], match[2])
quote.href = href.match(/(#[^#]*)?$/)[0] or '#'
+ else if /^\d+(#|$)/.test(href) and not (g.VIEW is 'thread' and g.BOARD.ID is boardID) # used on /f/
+ quote.href = "/#{boardID}/thread/#{href}"
container
diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee
index 9a029947f..c437066c6 100755
--- a/src/Monitoring/ThreadWatcher.coffee
+++ b/src/Monitoring/ThreadWatcher.coffee
@@ -220,7 +220,7 @@ ThreadWatcher =
continue unless QR.db and postObj.com
quotesYou = false
- regexp = /]*\bhref="(?:\/([^\/]+)\/thread\/(\d+))?(?:#p(\d+))?"/g
+ regexp = /]*\bhref="(?:\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g
while match = regexp.exec postObj.com
if QR.db.get {
boardID: match[1] or boardID