# Why do clickable boxes in hyperref urls in footnotes which are split across multiple pages include the intermediate pages?

Consider the following code:

\documentclass{article}
\usepackage{lipsum}
\usepackage{hyperref}
\newcommand{\veryn}[1]{\ifnum\numexpr#1 > 0
very/\veryn{#1-1}%
\fi
}
\edef\foo{\noexpand\url{this/is/a/\veryn{200}long/url/spanning/multiple/lines}}
\begin{document}
\lipsum[1-2]\footnote{\lipsum[1]}
\lipsum[3]\footnote{\foo}
\lipsum[4]
\end{document}


The first page looks normal as expected in pdflatex: The second page, however, highlights the main text of the page as a link:

Why does this happen? (Is it a bug in hyperref that should be reported? (Where?)) Is there a way to avoid this?

• it is not a hyperref bug, but a deficiency of the pdflatex (and also luatex) primitive. It could be avoided if the output routine would add another box level around the footnote, but I don't know if this is possible without affecting the page layout. – Ulrike Fischer Mar 18 at 21:01