Page 1 of 1

msapplication-* meta name values

Posted: Thu May 29, 2014 11:47 am
by ReneK
Hi,

the validator engine does not recognize the new msapplication metadata name values listed here:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Maybe this is something to improve. I'm writing this, because the validator engine already knows older name values such as msapplication-TileColor, for example.

This is, however, not a show-stopper. As kind as the software package is, it allows me to add missing functionality on my own (really cool, both thumbs up). Don't know if someone else is interested in it, but here it goes:

Code: Select all

function onMessageID_2013070902() {
  if strpos($omid_msgtext, '"msapplication-square70x70logo"') >= 0 {
    $omid_cancel = true;
  }
  else {
    if strpos($omid_msgtext, '"msapplication-square150x150logo"') >= 0 {
      $omid_cancel = true;
    }
    else {
      if strpos($omid_msgtext, '"msapplication-square310x310logo"') >= 0 {
        $omid_cancel = true;
      }
      else {
        if strpos($omid_msgtext, '"msapplication-wide310x150logo"') >= 0 {
          $omid_cancel = true;
        }
        else {
          if strpos($omid_msgtext, '"msapplication-notification"') >= 0 {
            $omid_cancel = true;
          }
          else {
            if strpos($omid_msgtext, '"msapplication-config"') >= 0 {
              $omid_cancel = true;
            }
          }
        }
      }
    }
  }
}
BTW: Having an "else if" staement would be nice. :wink:

Rene

Re: msapplication-* meta name values

Posted: Thu May 29, 2014 3:48 pm
by Albert Wiersch
Hello,

Thank you for bringing this to my attention. I will add these in the next update. In the next major release, it should also link check the images.

Also, thank you for posting your user function.

I've thought about an "else if" statement. I'd like to have one but have to overcome some internal technical issues to support it... so you may or may not see it in the future.

By the way, I've reformatted your user function to the format I like. I know this is personal preference but you may find this easier to read.

Code: Select all

function onMessageID_2013070902() {
  if        strpos($omid_msgtext, '"msapplication-square70x70logo"')   >= 0 { $omid_cancel = true; }
  else { if strpos($omid_msgtext, '"msapplication-square150x150logo"') >= 0 { $omid_cancel = true; }
  else { if strpos($omid_msgtext, '"msapplication-square310x310logo"') >= 0 { $omid_cancel = true; }
  else { if strpos($omid_msgtext, '"msapplication-wide310x150logo"')   >= 0 { $omid_cancel = true; }
  else { if strpos($omid_msgtext, '"msapplication-notification"')      >= 0 { $omid_cancel = true; }
  else { if strpos($omid_msgtext, '"msapplication-config"')            >= 0 { $omid_cancel = true; }
}}}}}}

Re: msapplication-* meta name values

Posted: Tue Aug 26, 2014 4:01 am
by ReneK
Hi Albert,

nice to see this in action, thanks :-)
You're doing a case insensitive check, though. This looks somewhat suboptimal to me, because: "Be aware that preset values are case-sensitive and must be specified using the case shown."

See: Pinned site metadata reference

Rene

Re: msapplication-* meta name values

Posted: Tue Aug 26, 2014 9:19 am
by Albert Wiersch
You're very welcome. :D

In the next major release, v15, CSE HTML Validator will check to make sure those meta names (the ones listed on the Microsoft "Pinned site metadata reference" page you linked to) are case-sensitive. If you'd like to try a BETA version then please send me a PM (private message).