Label reference somehow appears in PDF bookmark; how to get rid?

The following code produces the following PDF.

\documentclass{article}
\usepackage[bookmarks=true] {hyperref}
\begin{document}

\part{\label{blah}Hi}

\end{document}


I'm not sure why "[blah]" somehow appears in the PDF bookmark. How do I get rid of it?

[I'm using hyperref because I want to have any arbitrary text (e.g. "Hehehe") for my hyperlink.]

You wrote, in a comment on this answer:

I want to use \hyperref so I can put arbitrary text for my hyperlink.

You could use the \texorpdfstring macro.

It's not possible to have general hyperlinks in the Bookmarks portion of the pdf document.

\documentclass{article}
\usepackage[bookmarks=true] {hyperref}
\begin{document}
\part{Hi} \label{blah}
\end{document}


It works fine if you use \ref.

\documentclass{article}
\usepackage[bookmarks=true] {hyperref}
\begin{document}

\part{Hi}
\label{blah}

\end{document}

• I want to use hyperref so I can put arbitrary text for my hyperlink. – dtcm840 Jul 15 '18 at 8:47

Or based on this answer by Heiko Oberdiek:

\documentclass{article}
\usepackage[bookmarks=true] {hyperref}
\pdfstringdefDisableCommands{%
\def\hyperref#1#{}%
}
\begin{document}
\part{\label{blah}Hi}
\end{document}


Result:

• Looks good, but I don't understand it fully and I'm worried there may be side effects especially if I declare it globally. – dtcm840 Jul 16 '18 at 3:53