Improper variable sanitization
Fixes #2166 calling newreply with no tid does not show the correct error page