A docstring that illustrated expected input and output here would help, as most readers are probably unfamiliar with CD's HTML :)