[OTR-users] OTR HTML formatting problem using Miranda/Gaim/more?

Ian Goldberg ian at cypherpunks.ca
Thu Mar 22 10:25:26 EDT 2007


On Thu, Mar 22, 2007 at 11:09:52PM +1100, Scott Ellis wrote:
> i don't beleive the jabber plugin for miranda does that, because i think
> HTML entities in messages are outside of the jabber protocol specification
> (someone please correct me if i'm wrong). so the gaim client should be
> stripping them before passing them to OTR when sending. i would guess that
> even if they are allowed, they would need to be encoded in some way to
> appear in the XML that jabber uses - which needs to be done before
> encryption - and that's not happening if you're seeing them in miranda
> (since miranda is not decoding them).

Here's what's happening:

- Jabber messages are composed of two parts: a "marked up" part
  (optional) with all the usual HTML bold, font, etc. tags, and a
  "plain" part (mandatory) with all that stuff stripped.

- Gaim will strip HTML tags from the message the user composes, and put
  the result in the "plain" part, and the original message in the
  "marked up" part.

- When OTR is in use, gaim passes the marked up text to OTR for
  encryption.  OTR outputs the ciphertext, which has no markup.
  *This is according to the OTR spec, which says that the plaintext of
  messages can have HTML markup in it.* So the same ciphertext gets put
  in both the "marked up" and "plain" parts of the Jabber message.

- Miranda only looks at the "plain" part, and (rightly) doesn't expect
  it to contain markup.  It passes the ciphertext to OTR for decryption,
  but then fails to take into account that OTR plaintext *is* allowed to
  contain markup.  If it really doesn't want to display the markup,
  it'll need to use the same function the Miranda AIM plugin uses to
  remove the markup from the plaintext before displaying it.

So it seems the solution is for the Miranda OTR plugin to strip HTML
tags from the decrypted plaintext for those protocols that don't want to
handle them; from what I understand, it already does that for AIM (with
the cooperation of the AIM plugin), so either convince the Jabber plugin
to do the same thing, or just have the OTR plugin automatically do it.

Hope that clears things up,

   - Ian



More information about the OTR-users mailing list