Fixed a subtle unicode issue related to string expansion when using an `trac.util.markup.Element` argument.
Fixed a subtle unicode issue related to string expansion when using an `trac.util.markup.Element` argument.

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` ...


git-svn-id: 0d96b0c1a6983ccc08b3732614f4d6bfcf9cbb42@3314 af82e41b-90c4-0310-8c96-b1721e28e2e2

rbaumg/trac,rbaumg/trac,rbaumg/trac,rbaumg/trac