Fix JS error when hitting "islandora/search" (without slash after "search")

Also, get rid of some trailing whitespace.