Added unit test and license for xml encode fix