&& preg_match('/=|\/|,/', $response->getHeader('Link')[1]) == FALSE
&& !in_array($response->getHeader('Link')[1], ['#top'])
&& in_array($response->getHeader('Content-Type'), ['text/html', 'application/xhtml+xml', 'application/xml'])
- && !preg_match('/(\s[^>]*(name|id)(\s+)?=(\s+)?["\'])(' . preg_quote($response->getHeader('Link')[1], '/') . ')(["\'][^>]*>)/i', $response->getBody())
+ && !preg_match('/(\s[^>]*(name|id)(\s+)?=(\s+)?["\'])(' . preg_quote(urldecode($response->getHeader('Link')[1]), '/') . ')(["\'][^>]*>)/i', $response->getBody())
) {
// Override status code 200 with status code 404 so it can be handled with
// default status code 404 logic and custom error text.