Update link regex to handle semicolons (for escaped urls) and match periods at the end of the url
- Add htmlEncode and htmlDecode functions