I have been following the tips on Shopify Resources to ask my visitors for permission to use cookies as per the EU cookie law.
The coding works, but when I pass the coding supplied through the W3C Markup Validation Service it comes up with the following error
Error Line 25, Column 139: Attribute read_more not allowed on element script at this point. …-cookie/require-opt-in.js" read_more="doc/website_privacy_policy.pdf">
My coding is
<link rel="stylesheet" type="text/css" href="http://www.heartinternet.co.uk/eu-cookie/main.css"/>
<script type="text/javascript" src="http://www.heartinternet.co.uk/eu-cookie/support-opt-in.js"></script>
<script type="text/javascript" src="http://www.heartinternet.co.uk/eu-cookie/require-opt-in.js" read_more="doc/website_privacy_policy.pdf"></script>
I have tried moving the read_more attribute outside of the <script> tag by changing it to
<script type="text/javascript" src="http://www.heartinternet.co.uk/eu-cookie/require-opt-in.js">read_more="doc/website_privacy_policy.pdf";</script>
That didn't work as it didn't display the 'read more' link in the pop-up. I also tried putting it into a separate <script> block so changing the coding to
<link rel="stylesheet" type="text/css" href="http://www.heartinternet.co.uk/eu-cookie/main.css"/>
<script type="text/javascript" src="http://www.heartinternet.co.uk/eu-cookie/support-opt-in.js"></script>
<script type="text/javascript">read_more="doc/website_privacy_policy.pdf";</script>
<script type="text/javascript" src="http://www.heartinternet.co.uk/eu-cookie/require-opt-in.js"></script>
but that didn't work either. Again, the 'read more' link wasn't displayed.
Is there a way of passing the read_more variable into the require-opt-in.js file and be compliant with W3C Markup?