From efb1a0498ad8eb0efa03aabe8bcd444f0f833ae7 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 24 Nov 2018 23:08:53 -0800 Subject: [PATCH] Fix catalog/search link rewriting. #2151 --- src/Miscellaneous/CatalogLinks.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Miscellaneous/CatalogLinks.coffee b/src/Miscellaneous/CatalogLinks.coffee index 751fff099..f0ff09e13 100644 --- a/src/Miscellaneous/CatalogLinks.coffee +++ b/src/Miscellaneous/CatalogLinks.coffee @@ -37,8 +37,8 @@ CatalogLinks = node: -> for a in $$ 'a', @nodes.comment - if m = a.href.match /^https?:\/\/boards\.4chan(?:nel)?\.org\/([^\/]+)\/catalog(#s=.*)?/ - a.href = "//boards.4chan(?:nel)?.org/#{m[1]}/#{m[2] or '#catalog'}" + if m = a.href.match /^https?:\/\/(boards\.4chan(?:nel)?\.org\/[^\/]+)\/catalog(#s=.*)?/ + a.href = "//#{m[1]}/#{m[2] or '#catalog'}" return toggle: ->