Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

Allow XML in threads

I run a technical forum, where sharing pieces of code and XML is very common.

Each time a user needs to paste some XML on a thread, Vanilla hides all the tags and leaves the text nodes, making the XML unreadable. The current work around is to add spaces after each < and > to make the XML legible, but it is invalid. So if I need to test something with it, I need to copy and remove the spaces.

How can my users share XML and show it as it is on a thread comment?



  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    When ever you paste code, you need to select it and choose code from the drop down menu of the editor so it shows as code.

    I don't know what formatting you are using. What editor ?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    It should be possible by enclosing the xml in ~~~ like that:

    xml here

    and that should look like that (some microsoft example xml):

    <?xml version="1.0"?>
       <book id="bk101">
          <author>Gambardella, Matthew</author>
          <title>XML Developer's Guide</title>
          <description>An in-depth look at creating applications 
          with XML.</description>
       <book id="bk102">
          <author>Ralls, Kim</author>
          <title>Midnight Rain</title>
          <description>A former architect battles corporate zombies, 
          an evil sorceress, and her own childhood to become queen 
          of the world.</description>
Sign In or Register to comment.