سؤال

I'm using the Roadkill wiki engine and trying to paste xml into the pages like this: {{{this is a test}}}

but the "" text is not displaying, it only shows "this is a test"

Is there another way to escape it so that the page shows "this is a test"?

هل كانت مفيدة؟

المحلول

I found a solution to this. Roadkill has a tokens file (App_Data\tokens.xml) in there you can set a text token to look for, and a replacement value. So to fix the "" and "" elements, I added the following to the tokens file:

<TextToken>
    <Name>Begin Body Element</Name>
    <Description><![CDATA[
    fixes the body element problem
    ]]>
    </Description>
    <SearchRegex>&lt;Body&gt;</SearchRegex>
    <HtmlReplacement><![CDATA[&lt;body&gt;]]>
    </HtmlReplacement>
</TextToken>
<TextToken>
    <Name>End Body Element</Name>
    <Description><![CDATA[
    fixes the body element problem
    ]]>
    </Description>
    <SearchRegex>&lt;/Body&gt;</SearchRegex>
    <HtmlReplacement><![CDATA[&lt;/body&gt;]]>
    </HtmlReplacement>
</TextToken>

نصائح أخرى

In version 1.7 onwards you can use the inbuilt syntax highlighting:

[[[code lang=XML| 
your XML here
]]]

This gives you client-side syntax highlighting from SyntaxHighlighter. The Roadkill documentation is generally a few months behind but it does eventually contain the information you need!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top