duct-taped trimText() to pass unit test