RichTextArea removing html code for image tags

For whatever reason when I setValue with the following code:

the getValue() then results in:

This is fine for rendering html but I need to pass the resulting html as xml to generate a PDF and it fails as this is not legal xml code, it needs the closing backslash. Is there any reason it’s stripping the backslash? Is there any way to prevent this behavior?

I think this is due to RichTextArea’s client side implementation. The html tags are processed via GWT’s SafeHtml class, and it looks like it is stripping the backlash.