A first step in multi line support (issue #3)
use indexOf instead of contains because webkit doesn't support it