WP-1124 spaces in matching strings

http://jira.webinos.org/browse/WP-1124

Fixed issues related to matching strings containing spaces