Cast TreeTitle to HTMLText

Closes #2989