Make parsing of inlined image urls more robust