Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
We would like to use Microsoft AntiXss 3.1 to encode all user input (i.e. in QueryStrings on search & filter pages).
I have tested this using the following
<msxml:script language="C#" implements-prefix="lelo"><msxml:assembly name="AntiXssLibrary" /><msxml:using namespace="Microsoft.Security.Application" /> <![CDATA[public string antiXss(string querystring){ return AntiXss.HtmlEncode(querystring);}]]></msxml:script>
As we have many XSLT files I don't really want to add this to each one, is there a more elegant solution?
Cheers,
Adrian
You could wrap it in an XSLT extension instead. The the reference would automatically be made in all new xslt files.
There is a small guide here: http://en.wikibooks.org/wiki/Umbraco/Create_xslt_exstension_like_umbraco.Library_in_C
tak Morten exactly what I was looking for :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Calling global c# method from xslt
Hi All,
We would like to use Microsoft AntiXss 3.1 to encode all user input (i.e. in QueryStrings on search & filter pages).
I have tested this using the following
<msxml:script language="C#" implements-prefix="lelo">
<msxml:assembly name="AntiXssLibrary" />
<msxml:using namespace="Microsoft.Security.Application" />
<![CDATA[
public string antiXss(string querystring)
{
return AntiXss.HtmlEncode(querystring);
}
]]>
</msxml:script>
As we have many XSLT files I don't really want to add this to each one, is there a more elegant solution?
Cheers,
Adrian
You could wrap it in an XSLT extension instead. The the reference would automatically be made in all new xslt files.
There is a small guide here: http://en.wikibooks.org/wiki/Umbraco/Create_xslt_exstension_like_umbraco.Library_in_C
tak Morten exactly what I was looking for :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.