[wp-trac] Re: [WordPress Trac] #4784: robot meta tag needs beautification

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 22 10:18:07 GMT 2007

#4784: robot meta tag needs beautification
 Reporter:  hakre        |        Owner:  anonymous  
     Type:  defect       |       Status:  new        
 Priority:  normal       |    Milestone:  2.3 (trunk)
Component:  Template     |      Version:  2.2.2      
 Severity:  normal       |   Resolution:             
 Keywords:  needs-patch  |  
Comment (by hakre):

 Replying to [comment:8 Nazgul]:
 > Replying to [comment:6 Otto42]:
 > > Double quotes are required in XHTML Strict, while Transitional allows
 either single or double quotes.
 > Could you point me to a place where that's specified?
 > I've searched the specs, but as far as I can tell XML (and XHTML) allow
 both ' and " to encapsulate attribute values. Also, my personal blog is
 XHTML 1.0 Strict according to the W3 validator and it uses ' for some
 attribute encapsulation.

 It's not that hard to find out that Double Quotes are needed by specs:

   [10] `   AttValue    ::=    '"' ([^<&"] | Reference)* '"'`

   XHTML family document types are XML based, and ultimately are designed
 to work in conjunction with XML-based user agents.

 As XML is the basis of all XHTML double quotes should be considered. Just
 think of you have a useragent that is XML- and not SGML-based. Since this
 behaviour is compatible down to SGML (which is the Basis of HTML and does
 support both single and double quotes), there are no backward compability
 Issues in using double quotes.

 If someone argues that the W3C-Validator is telling something else (I read
 that above) should read the docs of the validator that is clearly speaking
 about it's limitations. That is one if it. The old Validator page made
 this more clear. Additionally this is plain "best practice" in (X)HTML

 Anyways, this is not only about the specs only. The really most biggest
 part of the WP-Core-Code simply uses double-quotes for the xhtml-output so
 I strongly argue to do it here as well.

 For the Tab (\t) it was the same kind of argumentation for me: since all
 the other stuff in head and the default theme have a tab in front I wanted
 to see this inside here as well.

 In general i think it is most important to have the same form if quoting
 usage everywhere to create a nice output and sothat devs show they care
 about the output. No nitty slitty witty "but oh-oh-oh it validates" -
 discussions anylonger please.

 Replying to [comment:8 Nazgul]:
 > Personally I favor readable PHP sourcecode over consistent HTML. Both
 are machine-readable formats which aren't meant to really be read by
 humans anyway, but it's the PHP code I have to read and edit as a

 So you mean the code in the diff is not as readable as it should? Could
 you please reference the WP-Coding guidelines on this one? Since the code
 is edited by many people a single personal opinion shouldn't make such a
 bold statement herein. And I would doubt that: {{{ echo " <meta
 name=\"robots" content=\"noindex,nofollow\" />\n"; }}} is more readable.
 But I have no problem to adopt the guidelines here in my diffs.

 For me this is connected to the questions wether to use single quoted
 strings in favor of double quoted one in php. My practise (as of many
 others) is to use mainly single quoted strings otherwise sometimes being
 lazy, and right now I do not see why to change this with my wp-diffs. As
 said, point me to the guilines if there are any and I take care about it.

 Replying to [comment:4 Stevie212]:
 > Also the <link rel='archives'> does this as well, this should be changed
 > <link rel='archives' title='August 2007' href='http://localhost/wp' />
 > Should be:
 > <link rel="archives" title="August 2007" href="http://localhost/wp" />

 Added this to the list and updated the patch. motto-quote: "Gosh, it *was*
 already tabbed!" ;) This time I even took the oportunity to beautify the
 sourcecode as well.

Ticket URL: <http://trac.wordpress.org/ticket/4784#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list