Remove leading and ending white space when using ui filter

Designed to resolve https://github.com/OSU-Net/cyder/issues/274