Add support for <dialog> tag.

fixes #2017