P3P bug check
I am trying to get my site P3P compatible (even though there are some who say its useless!) and I discovered a bug that HTML Validator should check for: (I discovered the bug when debugging my P3P code on the W3C site).
The CP (compact policy) value must be enclosed in double quotes. Which means that:
is incorrect despite it validating.
It should render as:
Also, an additional check should be carried out for the following:
If any one of the two are present, then a TIP should be displayed requesting the other tag be present. For ideal functioning of the P3P, both meta tags should be present.
The CP (compact policy) value must be enclosed in double quotes. Which means that:
- Code: Select all
<meta http-equiv="P3P" content="policyref='http://www.example.com/w3c/p3p.xml', CP='NID DSP NOI COR'" />
is incorrect despite it validating.
It should render as:
- Code: Select all
<meta http-equiv="P3P" content='policyref="http://www.example.com/w3c/p3p.xml", CP="NID DSP NOI COR"' />
Also, an additional check should be carried out for the following:
- Code: Select all
<meta http-equiv="P3P" content='policyref="http://www.example.com/w3c/p3p.xml", CP="NID DSP NOI COR"' />
<link rel="P3Pv1" href="/w3c/p3p.xml" />
If any one of the two are present, then a TIP should be displayed requesting the other tag be present. For ideal functioning of the P3P, both meta tags should be present.