Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
cvoluter #1
Member since Jan 2015 · 14 posts
Group memberships: Members
Show profile · Link to this post
Subject: url encoding
Hello,
Does xmpp stream is urlencoded before send into Matrix ?

If true, is it possible to deactivate it ?

Thanks,
Avatar
Alex #2
Member since Feb 2003 · 4308 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
sorry, but I don't understand your question. Can you please elaborate?

Alex
Avatar
cvoluter #3
Member since Jan 2015 · 14 posts
Group memberships: Members
Show profile · Link to this post
Sorry,
I rephrase my question :

I want to know if send xml into texte stream, braces and html caractères are modified like this : "<test>" -> ";&lt/test/;&lg"

When i send this content in a publish node : <test>test</test>

My result is :
  1.  <pubsub xmlns="http://jabber.org/protocol/pubsub">
  2.     <publish node="testNode">
  3.       <item>
  4.         <Message xmlns="PubSub">&lt;test&gt;test&lt;/test&gt;</Message>
  5.       </item>
  6.     </publish>
  7.  </pubsub>
  8. </iq>

And i would like this :

  1.  <pubsub xmlns="http://jabber.org/protocol/pubsub">
  2.     <publish node="testNode">
  3.       <item>
  4.         <Message xmlns="PubSub"><test>test</test></Message>
  5.       </item>
  6.     </publish>
  7.  </pubsub>
  8. </iq>

This url encoding is provided by matrix core ? Is it possible to deactivate it ?

Thanks,
This post was edited 2 times, last on 2015-03-17, 14:20 by Alex.
Avatar
Alex #4
Member since Feb 2003 · 4308 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this depends on how you add this to the Xml Dom with MatriX.
When you use the Value property then it of course gets encoded, because you set the inner Text value of an Xml Element.

What you want is to add a complete new Xml Element with children do the DOM.

what you can do is the following:

  1. var newEl = XmppXElement.LoadXml("<test>test</test>");
  2. item.Add(newEl);

Does this solve your problem?

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS