Adding order name in URL query in confirmation email

Hello,

I want create link etc. http://www.domain.com?order=#4518

where is #4158 order name and I try achieve that on this way: http://www.domain.com?order={{name}}

But there is problem because {name} should be coded trough toURI() method, because “#” is illegal url character. How to achieve that?

Thank you,
Bozidar