Doc: corrects obsolete pointer syntax

Goes from ~ to box
Closes #18551