What wrong
If the user use the char "#" in the reference name (minimal) as the first char, so:
In the HTML output is the <a> link with two chars "#". That is invalid (See 1, 2).
**Example of the wrong situation
The right way
the # character will remain allowed for users, but in the internal source will have the char "#" another transcription.