added trim call to innerHTML