The result of a string expansion (e.g. `"%s" % text`) is either a `str` object or an `unicode` object, depending on the arguments:
* if there's at least one `unicode` argument, the result will be `unicode`
* otherwise, it will be a `str` object, regardless of the actual type of
the argument __after__ the call to `__str__`.
So in this case, doing `"</p>%s<p>" % text`
when `text` is a `trac.util.markup.Element` object
will result in the `unicode` object returned by
`Fragment.__str__` to be coerced into a `str` object,
which in turn may raise the usual `UnicodeEncodeError` ...