fix fileName in preview tab templates
better URL regex on URL tab