powered by Jive Software

Smack 4.4.0-alpha2: xhtmlim#XHTMLText gives not well-format stanza for body "SYTLE"


#1

ejabberd returns “not well-format (invalid token)” for smack generated XEP-0071: XHTML-IM stanza;
Attached is the patch to fix the problem.

XHMTLText.patch (689 Bytes)

====== not well-format (invalid token) ========

     <message to='leopard@atalk.org' id='1557017781536106012136' type='chat'>
       <thread>
         eGJm01
       </thread>
       <body>
         HTTP file sticker-8095985880.png transferred; access via link: https://atalk.sytes.net:5443/upload/atalk.org/bbe1d68b2217ca2b1bdb770463f50a9ac5015477/KYpav6VHHQ8RDBxal4Va1wpGoNeCMt8501ICLSzx/sticker-8095985880.png
       </body>
       <html xmlns='http://jabber.org/protocol/xhtml-im'>
         <body xmlns='http://www.w3.org/1999/xhtml'<style>color:blue</style> xml:lang='us'>
           HTTP file sticker-8095985880.png transferred; access via link: https://atalk.sytes.net:5443/upload/atalk.org/bbe1d68b2217ca2b1bdb770463f50a9ac5015477/KYpav6VHHQ8RDBxal4Va1wpGoNeCMt8501ICLSzx/sticker-8095985880.png
         </body>
       </html>
       <active xmlns='http://jabber.org/protocol/chatstates'/>
     </message>
2019-05-05 08:56:21.557 7585-8202/org.atalk.android D/SMACK: RECV (0): 
     <stream:error>
       <not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
       <text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
         not well-formed (invalid token)
       </text>
     </stream:error>

========== patch applied ===========

2019-05-05 09:00:46.877 9646-10288/org.atalk.android D/SMACK: SENT (0): 
    <message to='leopard@atalk.org' id='155701804685961958143' type='chat'>
      <thread>
        Tv2eM1
      </thread>
      <body>
        HTTP file giphy_3o7qE4ivjz43ANV8OY_fixed_width.gif transferred; access via link: https://atalk.sytes.net:5443/upload/atalk.org/bbe1d68b2217ca2b1bdb770463f50a9ac5015477/PolJhZvPAoSVKh91YCkaTtRH8FuGrkB0SzpIKo3N/giphy_3o7qE4ivjz43ANV8OY_fixed_width.gif
      </body>
      <html xmlns='http://jabber.org/protocol/xhtml-im'>
        <body xmlns='http://www.w3.org/1999/xhtml' style='color: blue' xml:lang='us'>
          HTTP file giphy_3o7qE4ivjz43ANV8OY_fixed_width.gif transferred; access via link: https://atalk.sytes.net:5443/upload/atalk.org/bbe1d68b2217ca2b1bdb770463f50a9ac5015477/PolJhZvPAoSVKh91YCkaTtRH8FuGrkB0SzpIKo3N/giphy_3o7qE4ivjz43ANV8OY_fixed_width.gif
        </body>
      </html>
      <active xmlns='http://jabber.org/protocol/chatstates'/>
    </message>

#2

As always: thanks for reporting. :slight_smile:

Created SMACK-868.


#3

Opened a PR with your changes :slight_smile: