Loading...
 
Features / Usability

Features / Usability


Re: Re: How to paste code/XML into wiki and *not* have it get mutilated?

posts: 289 United States

As far as I know the only thing you can do is to replace all angle brackets with Wiki syntax equivalent codes, which would be ~60~ for less than (<) and ~62~ for greater than (>). You should then be able to use the {CODE} plugin. Such that the following code:

~60~recipe name="bread" prep_time="5 mins" cook_time="3 hours"~62~
   ~60~title~62~Basic bread~60~/title~62~
   ~60~ingredient amount="8" unit="dL"~62~Flour~60~/ingredient~62~
   ~60~ingredient amount="10" unit="grams"~62~Yeast~60~/ingredient~62~
   ~60~ingredient amount="4" unit="dL" state="warm"~62~Water~60~/ingredient~62~
   ~60~ingredient amount="1" unit="teaspoon"~62~Salt~60~/ingredient~62~
   ~60~instructions~62~
     ~60~step~62~Mix all ingredients together.~60~/step~62~
     ~60~step~62~Knead thoroughly.~60~/step~62~
     ~60~step~62~Cover with a cloth, and leave for one hour in warm room.~60~/step~62~
     ~60~step~62~Knead again.~60~/step~62~
     ~60~step~62~Place in a bread baking tin.~60~/step~62~
     ~60~step~62~Cover with a cloth, and leave for one hour in warm room.~60~/step~62~
     ~60~step~62~Bake in the oven at 180(degrees)C for 30 minutes.~60~/step~62~
   ~60~/instructions~62~
 ~60~/recipe~62~

Is translated as:

~60~recipe name="bread" prep_time="5 mins" cook_time="3 hours"~62~
   ~60~title~62~Basic bread~60~/title~62~
   ~60~ingredient amount="8" unit="dL"~62~Flour~60~/ingredient~62~
   ~60~ingredient amount="10" unit="grams"~62~Yeast~60~/ingredient~62~
   ~60~ingredient amount="4" unit="dL" state="warm"~62~Water~60~/ingredient~62~
   ~60~ingredient amount="1" unit="teaspoon"~62~Salt~60~/ingredient~62~
   ~60~instructions~62~
     ~60~step~62~Mix all ingredients together.~60~/step~62~
     ~60~step~62~Knead thoroughly.~60~/step~62~
     ~60~step~62~Cover with a cloth, and leave for one hour in warm room.~60~/step~62~
     ~60~step~62~Knead again.~60~/step~62~
     ~60~step~62~Place in a bread baking tin.~60~/step~62~
     ~60~step~62~Cover with a cloth, and leave for one hour in warm room.~60~/step~62~
     ~60~step~62~Bake in the oven at 180(degrees)C for 30 minutes.~60~/step~62~
   ~60~/instructions~62~
 ~60~/recipe~62~


You can do this fairly easily by pasting the original XML in your favorite text editor and performing a simple "search and replace".