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

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Update for critical security issue in PHPMailer included in release Vanilla 2.3.1
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?

Thanks.

Comments

  • 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"?>
    <catalog>
       <book id="bk101">
          <author>Gambardella, Matthew</author>
          <title>XML Developer's Guide</title>
          <genre>Computer</genre>
          <price>44.95</price>
          <publish_date>2000-10-01</publish_date>
          <description>An in-depth look at creating applications 
          with XML.</description>
       </book>
       <book id="bk102">
          <author>Ralls, Kim</author>
          <title>Midnight Rain</title>
          <genre>Fantasy</genre>
          <price>5.95</price>
          <publish_date>2000-12-16</publish_date>
          <description>A former architect battles corporate zombies, 
          an evil sorceress, and her own childhood to become queen 
          of the world.</description>
       </book>
    </catalog>
    
    rbrahmson
Sign In or Register to comment.