Make other links more resilient

I know nothing about xss but this pull will remove some chars from the user input like <> and verify that stuff needed by the template is there is we dont get error 500
https://github.com/styxit/HTPC-Manager/issues/272