friendship_controller:
Strip the spaces *before* you split the strings.