w3c-validation

Handling UTF characters in html form submission

我怕爱的太早我们不能终老 提交于 2019-12-01 23:18:29
My html form has a few input text fields which can potentially get characters from Chinese, japanese, european, special characters like £, etc. So, in short, unicode characters. To process these values at the server side (with php), can I assume that all browsers by default encode these characters in UTF-8 format at the time of form submission. Or is there is way to tell the browser to always submit these characters as UTF8 encoded , so that we can use the utf8_decode to process these values ? Thanks. Set the character encoding for the form page before you output the HTML. header('Content-Type

Ampersands in hyperlinks cause W3C validation to fail

自作多情 提交于 2019-12-01 22:24:59
I have a reacurring problem. I code nice standards compliant code only to have it fail due to ampersands within some of the hyperlink urls. Does anyone know of a work around or hack for this. Thanks You should URL Encode the hyperlinks, so all characters are turned into a valid ASCII format and don't contain any (X)HTML entities. For C# use HttpUtility.UrlEncode , for PHP urlencode , for JavaScript encodeURI , etc... Finding the right method for the language you're using shouldn't be that hard. I code nice standards compliant code only to have it fail due to ampersands within some of the

HTML5 validation error: Element source not allowed as a child element of audio in this context

断了今生、忘了曾经 提交于 2019-12-01 20:35:27
This is a snippet of code from my assignment. I've checked the w3 samples http://www.w3schools.com/html/html5_audio.asp and it is formatted correctly. Am I just going crazy because of these errors or did I miss something? I believe it's that the HTML5 source element doesn't like how the type is written in but how else would I do it? Please let me know if you guys see anything I'm just missing. <li>.ogg(HTML5 <code>audio</code> tag) <ul> <li style="list-style-type:none;"> <audio controls> ` <source src="/audio1/horse.ogg" type="audio/ogg"> <!-- IE Support --> <source src="http://itwp.macomb.edu

Making/finding html5 validator bookmarklet

▼魔方 西西 提交于 2019-12-01 17:45:28
I want to find or make a bookmarklet that will validate the html content of a currently viewed page using the W3C HTML 5 validator. I have found two bookmarklets and am trying to get one to behave a bit like one and a bit like the other, however I am not sure how to do this. Chris Coyier has an HTML5 validation bookmarklet that works well except it uses the page URI so does not work for locally tested sites: javascript:(function(){%20function%20fixFileUrl(u)%20{%20var%20windows,u;%20windows%20=%20(navigator.platform.indexOf("Win")%20!=%20-1);%20%20/*%20chop%20off%20file:///,%20unescape%20each

CSS background gradient validation

烈酒焚心 提交于 2019-12-01 16:28:55
I've got a number of CSS styles in my site's stylesheet that use the following, or variations of: background: -webkit-gradient( linear, left bottom, left top, color-stop(0.0, #585858), color-stop(1.0, #ACACAC) ); background: -moz-linear-gradient( center bottom, #585858 0%, #ACACAC 100% ); My problem is that when it comes to validating the CSS using the W3C Validator, I get the following error: Value Error : background -webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858),color-stop(1.0,#acacac)) is not a background value : -webkit-gradient(linear,left bottom,left top,color-stop

CSS background gradient validation

早过忘川 提交于 2019-12-01 15:27:55
问题 I've got a number of CSS styles in my site's stylesheet that use the following, or variations of: background: -webkit-gradient( linear, left bottom, left top, color-stop(0.0, #585858), color-stop(1.0, #ACACAC) ); background: -moz-linear-gradient( center bottom, #585858 0%, #ACACAC 100% ); My problem is that when it comes to validating the CSS using the W3C Validator, I get the following error: Value Error : background -webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858),color

w3c validator shows error for facebook open graph

微笑、不失礼 提交于 2019-12-01 10:59:24
I get 2 errors while validating my site in w3c validator. Line 7, Column 47: Attribute xmlns:og not allowed here. xmlns:fb="http://www.facebook.com/2008/fbml" > Line 7, Column 47: Attribute with the local name xmlns:fb is not serializable as XML 1.0. xmlns:fb="http://www.facebook.com/2008/fbml" > I guess it is related with Facebook open graph. I'm running my site on wordpress and using All in one SEO pack with Social features enabled. When Social feature is disabled, my site validates perfectly with no errors. Is there any fix to this problem? This is how it looks on site <!DOCTYPE html> <!--/

PHP - parse data from a SOAP response

和自甴很熟 提交于 2019-12-01 08:21:24
I'm using the W3 validator API, and I get this kind of response: <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <env:Body> <m:markupvalidationresponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:m="http://www.w3.org/2005/10/markup-validator"> <m:uri>http://myurl.com/</m:uri> <m:checkedby>http://validator.w3.org/</m:checkedby> <m:doctype>-//W3C//DTD XHTML 1.1//EN</m:doctype> <m:charset>utf-8</m:charset> <m:validity>false</m:validity> <m:errors> <m:errorcount>1</m:errorcount> <m:errorlist> <m:error> <m:line>7</m

PHP - parse data from a SOAP response

人盡茶涼 提交于 2019-12-01 06:56:54
问题 I'm using the W3 validator API, and I get this kind of response: <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <env:Body> <m:markupvalidationresponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:m="http://www.w3.org/2005/10/markup-validator"> <m:uri>http://myurl.com/</m:uri> <m:checkedby>http://validator.w3.org/</m:checkedby> <m:doctype>-//W3C//DTD XHTML 1.1//EN</m:doctype> <m:charset>utf-8</m:charset> <m

is -negative margin or padding invalid CSS according to W3C?

为君一笑 提交于 2019-12-01 03:57:10
is -negative margin or padding are invalid CSS aaccording to W3C ? According to Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification - 8.4 Padding properties , negative margin values are valid, negative padding values are not: Unlike margin properties, values for padding values cannot be negative 来源: https://stackoverflow.com/questions/1623163/is-negative-margin-or-padding-invalid-css-according-to-w3c