msapplication-* meta name values

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
ReneK
Rank II - Novice
Rank II - Novice
Posts: 31
Joined: Sun Jun 16, 2013 10:27 am

msapplication-* meta name values

Post by ReneK » Thu May 29, 2014 11:47 am

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

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: msapplication-* meta name values

Post by Albert Wiersch » Thu May 29, 2014 3:48 pm

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; }
}}}}}}
Image
Albert Wiersch

ReneK
Rank II - Novice
Rank II - Novice
Posts: 31
Joined: Sun Jun 16, 2013 10:27 am

Re: msapplication-* meta name values

Post by ReneK » Tue Aug 26, 2014 4:01 am

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

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: msapplication-* meta name values

Post by Albert Wiersch » Tue Aug 26, 2014 9:19 am

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).
Image
Albert Wiersch

Post Reply