Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jul 15, 2009 @ 16:12
    Darren Ferguson
    0

    is BrowserCaps.config loaded/used by Umbraco?

    Hi,

    Am trying to stop .net rendering downlevel markup to the w3c validator service by adding the following to my BrowserCaps.config

    <case match="W3C_Validator*">
        TagWriter = System.Web.UI.HtmlTextWriter
        W3CDomVersion = 1.0
    </case>

    But it doesn't seem to have any effect.

    Does anyone know if this should work?

     

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jul 16, 2009 @ 11:53
  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jul 17, 2009 @ 11:58
    Darren Ferguson
    0

    I found my own solution

    Assuming asp.net 2.0

    Add an App_Browsers folder to your web root. In that folder place a file called w3cvalidator.browser with the following contents:

    <browsers>
      <!--
      Browser capability file for the w3c validator
     
      sample UA: "W3C_Validator/1.305.2.148 libwww-perl/5.803"
      -->
      <browser id="w3cValidator" parentID="default">
        <identification>
          <userAgent match="^W3C_Validator" />
        </identification>

        <capture>
          <userAgent match="^W3C_Validator/(?'version'(?'major'\d+)(?'minor'\.\d+)\w*).*" />
        </capture>

        <capabilities>
          <capability name="browser" value="w3cValidator" />
          <capability name="majorversion" value="${major}" />
          <capability name="minorversion" value="${minor}" />
          <capability name="version" value="${version}" />
          <capability name="w3cdomversion" value="1.0" />
          <capability name="xml" value="true" />
          <capability name="tagWriter" value="System.Web.UI.HtmlTextWriter" />     
        </capabilities>
      </browser>
    </browsers>


  • 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.

Please Sign in or register to post replies