Those 4 lines of code were borrowed from Michal's ChromeExtensions class. I verified that it works correctly but did not look into why it trims white space.