I want to write an IIS Rewrite rule that detects <script>
markup containing a specific string. The normal mechanism for matching on <script>
involves matching against the src
. I have therefore looked at creating a custom tag, but that has proved problematic.
According to a large PDF I downloaded that purported to be a manual for IIS, customTags can be defined as follows:
<customTags>
<tags name="My Tags">
<tag name="item" attribute="src" />
<tag name="element" attribute="src" />
</tags>
</customTags>
Initially, I thought that perhaps having a empty attribute would allow me to access the inner text of the the script tag. However, specifying
<customTags>
<tags name="My Tags">
<tag name="script" attribute="" />
</tags>
</customTags>
throws an error. I haven't tried setting the attribute to "innerText". Will that work?