Error “! Illegal parameter number in definition of \ tikz @ children @ list.” with library mindmap and hyperref packages

I've been trying to put the following url in quotation marks: https://integrada.minhabiblioteca.com.br/#/books/9788522112654/cfi/98!/4/4@0.00:18.2. But I always get the following error: "! Illegal parameter number in definition of \ tikz @ children @ list." . I am generating the pdf file through the latexmk -pdflua -pvc file.tex command. Below is the file.tex code:

\documentclass{article}
\usepackage{tikz,hyperref}
\usetikzlibrary{mindmap}
\begin{document}
\centering
\begin{tikzpicture}[mindmap]
\centering
\tikzset{every node/.style={font=\fontsize{4mm}{4mm}\selectfont,text width=4cm,minimum size=3cm}}
\node [concept, text=blue!50!black!10,align=center] at (0,0)
child [concept]
;
\end{tikzpicture}
\end{document}


I noticed that if I make the code as below, I do not get this error. That is if I use the url only in the node parent and not in the node child.

\documentclass{article}
\usepackage{tikz,hyperref}
\usetikzlibrary{mindmap}
\begin{document}
\centering
\begin{tikzpicture}[mindmap]
\centering
\tikzset{every node/.style={font=\fontsize{4mm}{4mm}\selectfont,text width=4cm,minimum size=3cm}}
\node [concept, text=blue!50!black!10,align=center] at (0,0)
child [concept]
;
\end{tikzpicture}
\end{document}

• You can add \catcode#=12 after \begin{tikzpicture} – egreg Mar 13 '19 at 23:50
• Hi @egreg, "\catcode#=12" really worked, thank you for your suggestion. – Diego Bnei Noah Mar 14 '19 at 0:29

# was the problem, I think, and replacing it by \# seems to solve it.

\documentclass{article}
\usepackage{tikz,hyperref}
\usetikzlibrary{mindmap}
\begin{document}
\centering
\begin{tikzpicture}[mindmap]
\tikzset{every node/.style={font=\fontsize{4mm}{4mm}\selectfont,text width=4cm,minimum size=3cm}}
\node [concept, text=blue!50!black!10,align=center] at (0,0)