Fix HTML Validation error
-
W3C HTML Validator gives an error:
Bad value //fonts.googleapis.com/css?family=Open+Sans:400,300,600,700|Roboto+Condensed:300italic,400italic,700italic,400,300,700&subset=latin,latin-ext for attribute href on element link: Illegal character in query: | is not allowed.
Fix is to change ‘|’ to ‘%7C’ in functions.php in the function square_fonts_url()
Replace:
if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => implode( '|', $fonts ) , 'subset' => $subsets , ), '//fonts.googleapis.com/css' ); }
With:
if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => implode( '%7C', $fonts ) , 'subset' => $subsets , ), '//fonts.googleapis.com/css' ); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Fix HTML Validation error’ is closed to new replies.