rmccny Posted February 22, 2010 Share Posted February 22, 2010 After spending the past two weeks with the W3C validator pouring over vBulletin CMS code I came across a handful of items within WHMCS that could be corrected, speaking strictly from my use of the portal theme, that is. This is invalid for XHTML 1.0 Transitional. <script language="javascript"></script> This is valid. <script type="text/javascript"></script> A page with inline javascript must be wrapped in HTML comment tags to avoid validation errors with html entities (i.e. &). <script type="text/javascript"> <!-- function foo() { return bar; } //--> </script> In the grand scheme of things they're minor errors, however complete XHTML validation for a product like WHMCS would be a good idea. 0 Quote Link to comment Share on other sites More sharing options...
logicsurge Posted February 22, 2010 Share Posted February 22, 2010 Commenting out the javascript sometimes causes issues in newer browsers. The proper thing to use is the CDATA tag <script type="text/javascript"> /* <![CDATA[ */ function foo() { return bar; } /* ]]> */ </script> 0 Quote Link to comment Share on other sites More sharing options...
rmccny Posted February 22, 2010 Author Share Posted February 22, 2010 I have not personally used that convention as XHTML 1.1 transitional will validate either way, and in fact many sites including Google don't follow it properly, but you're right, if we're going to insist on following the proper standard that is the way it should be done. 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted February 26, 2010 Share Posted February 26, 2010 If you ignore the fact that XHTML is not natively supported by any browser and is basically dead, then yea Matt and co should update the code. 0 Quote Link to comment Share on other sites More sharing options...
rmccny Posted February 27, 2010 Author Share Posted February 27, 2010 Well then the solution is easy, don't change the code, change the DOCTYPE. Regardless of whether you think it's dead or not, the fact is that WHMCS is using a XHTML 1.1 Transitional DOCTYPE but not sending valid markup for it. Either way it's not valid to spec, so yes, the code should be changed. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.