added html encode and decode to library