ECMS-6193: Advanced search: Impossible to search from-to

Fix description:
 - Revert ECMS-5904 and escape XSS in gtmpl file