Archived topic
Problem with w3 validation
5 replies · Started by Dimitris Chatzimichailidis on July 2, 2019
Hello guys.
I am facing out a problem with w3 validation with our website with elementor pro.
You can check it here:
https://validator.w3.org/nu/?doc=https%3A%2F%2Fnikisountoulidou.gr%2F
The problem I am refering is for script tags, no Google Fonts. I found your topic to change that but I cannot deal with the strange string that are added in type javascript and mess the validator.
Can anyone have any idea how can I change that?
Thanks in advance!
Hi there,
Are you talking about this one?:
Bad value for attribute href on element link: Illegal character in query: | is not allowed.
If so, you can fix it with this filter:
add_filter( 'generate_typography_google_fonts', function( $google_fonts ) {
return str_replace( '|', '%7C', $google_fonts );
} );
Let me know :)
No Tom. I have seen your answer about this issue in another post. I am talking about script with a src attribute and type with different value from the proper one.
Do you have any idea why this happened?
Ah, WordPress adds those by default. There are ways to remove them, but it's really not worth doing in my opinion.
If you want to go ahead and do it, this should help: https://wordpress.stackexchange.com/a/287833/90661
Thanks Tom for your answer.
I have to do that because my client needs a zero error report.
Finally, I resolved this. This strange string before type is added from RocketLoader of Cloudflare! When I disabled it, the strange string disappears.
Thanks a lot for your help. I hope this post could help someone else in the future!
Glad you got it fixed - thanks for sharing what it was :)