<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>6091</bug_id>
          
          <creation_ts>2008-09-17 22:32:28 +0000</creation_ts>
          <short_desc>Using the &apos;accept=&apos; url append option returns invalid reusable link.</short_desc>
          <delta_ts>2009-01-29 16:13:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>Website</component>
          <version>0.8.3</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://wolflinux.homelinux.org/bug/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.8.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Taylor Gresser">taylor.gresser</reporter>
          <assigned_to name="Ville Skyttä">ville.skytta</assigned_to>
          <cc>ot</cc>
    
    <cc>taylor.gresser</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21934</commentid>
    <comment_count>0</comment_count>
    <who name="Taylor Gresser">taylor.gresser</who>
    <bug_when>2008-09-17 22:32:28 +0000</bug_when>
    <thetext>In short, the &quot;Linking to this result&quot; for my php/xhtml code should return:
http://validator.w3.org/check?uri=http%3A%2F%2Fwolflinux.homelinux.org%2Fbug%2F&amp;accept=application%2Fxhtml%2Bxml;
but instead returns:
http://validator.w3.org/check?uri=http%3A%2F%2Fwolflinux.homelinux.org%2Fbug%2Faccept=application%2Fxhtml%2Bxml;
(missing an &apos;&amp;&apos; before &quot;accept=&quot;)

Long version:
I use the following code at the top of each page on my site:

&lt;?php
if(stristr($_SERVER[&quot;HTTP_ACCEPT&quot;],&quot;application/xhtml+xml&quot;)){
        header(&quot;Content-Type: application/xhtml+xml; charset=UTF-8&quot;);
        echo(&apos;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;&apos;);
} else {
        header(&quot;Content-Type: text/html; charset=UTF-8&quot;);
        echo (&apos;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;&apos;);
}
?&gt;

This requires me to append &quot;&amp;accept=application%2Fxhtml%2Bxml&quot; to the end of the normal validation string when I want to test xhtml 1.1 validation, and I can leave it off to test xhtml 1.0 strict.

When the validation completes, it returns a link in the &quot;Linking to this result&quot; section to allow easy re-validation. This link leaves out the &apos;&amp;&apos; character, resulting in it attempting to validate the page &quot;http://wolflinux.homelinux.org/bug/accept=application%2Fxhtml%2Bxml&quot;, which does not exist.

I&apos;m filing this report on the assumption that this is not the desired behavior. If it is, my apologies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21969</commentid>
    <comment_count>1</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2008-09-19 21:04:35 +0000</bug_when>
    <thetext>This is hopefully now fixed in CVS, thanks for the catch.

&quot;Hopefully&quot; because I was not able to actually test it as the test case you described triggers something that looks like a DTD related error in XHTML 1.1 mode with the development version of the validator and thus it does not produce a self-referential validation link at all.  But the bug looked pretty obvious.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21980</commentid>
    <comment_count>2</comment_count>
    <who name="Taylor Gresser">taylor.gresser</who>
    <bug_when>2008-09-20 18:13:37 +0000</bug_when>
    <thetext>When you say the described test case is causing problems in the development version of the validator, do you mean the validator is having issues with the accept= flag, or something incorrect in the doctype string being used?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21981</commentid>
    <comment_count>3</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2008-09-20 19:18:37 +0000</bug_when>
    <thetext>Neither, but something in the used (XHTML 1.1?) DTD contents upsets the validator, see for example

http://qa-dev.w3.org/wmvs/HEAD/check?uri=http%3A%2F%2Fwolflinux.homelinux.org%2Fbug%2F&amp;charset=(detect+automatically)&amp;doctype=Inline&amp;group=0&amp;accept=application%2Fxhtml%2Bxml

Validation Output:  1 Error

   1. Error Line 4615, Column 0: character &quot;]&quot; not allowed in declaration subset.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21982</commentid>
    <comment_count>4</comment_count>
    <who name="Taylor Gresser">taylor.gresser</who>
    <bug_when>2008-09-20 20:21:53 +0000</bug_when>
    <thetext>That makes sense, I think.

http://192.168.1.30/bug/test.php is the same page with no php, and http://192.168.1.30/bug/test2.php is the same page yet again with no doctype string at all. Specifying xhtml1.1 as the doctype results in the same error, and neither of those files contain a &apos;]&apos; character.

http://qa-dev.w3.org/wmvs/HEAD/check?uri=http%3A%2F%2Fwolflinux.homelinux.org%2Fbug%2Ftest.php&amp;charset=utf-8&amp;doctype=XHTML+1.1&amp;group=0&amp;verbose=1&amp;accept=application%2Fxhtml%2Bxml

http://qa-dev.w3.org/wmvs/HEAD/check?uri=http%3A%2F%2Fwolflinux.homelinux.org%2Fbug%2Ftest2.php&amp;charset=utf-8&amp;doctype=XHTML+1.1&amp;group=0&amp;verbose=1&amp;accept=application%2Fxhtml%2Bxml

You&apos;ve probably already tested that, but I want to try to help out. Anything I can do?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21985</commentid>
    <comment_count>5</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2008-09-21 08:00:48 +0000</bug_when>
    <thetext>Thanks for the offer, but I don&apos;t think there&apos;s anything more you can do to help at this point.

Meanwhile, I managed to test locally by applying the fix in CVS to the 0.8.3 version of the validator, and it does resolve the issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>