msapplication-* meta name values

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
Post Reply
ReneK
Rank II - Novice
Posts: 33
Joined: Sun Jun 16, 2013 10:27 am

msapplication-* meta name values

Post 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
User avatar
Albert Wiersch
Site Admin
Posts: 3768
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: msapplication-* meta name values

Post 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; }
}}}}}}
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
ReneK
Rank II - Novice
Posts: 33
Joined: Sun Jun 16, 2013 10:27 am

Re: msapplication-* meta name values

Post 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
User avatar
Albert Wiersch
Site Admin
Posts: 3768
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: msapplication-* meta name values

Post by Albert Wiersch »

You're very welcome. :D

In the next major release, v15, CSS 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).
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
Albert Wiersch
Site Admin
Posts: 3768
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: msapplication-* meta name values

Post by Albert Wiersch »

Albert Wiersch wrote: Thu May 29, 2014 3:48 pmI'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.
Old thread but I came across it today and want to mention that 'elseif' was added to TNPL several major versions ago.

TNPL is the name of the scripting language that allows for a very high degree of customization to validations.

More information about TNPL is here:
https://www.htmlvalidator.com/current/d ... l?tnpl.htm
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply