Skip to content

Conversation

@nidhijaju
Copy link
Contributor

Fixes #3273.

@nidhijaju
Copy link
Contributor Author

@martinthomson Does this address your concern from #3273?

@martinthomson
Copy link
Contributor

This should help. I don't know if this will present better in reality though, the URLs are all quite long, so there's a good chance that the whole thing will wrap badly. Maybe consider eliminating or truncating the origin part.

@nidhijaju nidhijaju force-pushed the fix-comparison-examples branch from 75cb4b1 to d4be317 Compare January 6, 2026 05:11
@nidhijaju
Copy link
Contributor Author

nidhijaju commented Jan 6, 2026

so there's a good chance that the whole thing will wrap badly. Maybe consider eliminating or truncating the origin part.

It looks like the wrapping isn't too bad, but I've removed the rest of the URI so we just have the query now (and adjusted the column width so there isn't wrapping). Does that look any better to you?

</dt>
<dd><tt>+</tt> and <tt>%20</tt> are both parsed as U+0020 SPACE</dd>
</dl>
| Query A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Query B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Reason for Equivalence |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that you need the &nbsp; stuff.

This is what I get with it:

     +===================+==============+============================+
     | Query A           | Query        | Reason for Equivalence     |
     |                   | B            |                            |
     +===================+==============+============================+
     | null              | ?            | A null query is parsed the |
     |                   |              | same as an empty string    |
     +-------------------+--------------+----------------------------+
     | ?a=x              | ?%61=%78     | Parsing performs percent-  |
     |                   |              | decoding                   |
     +-------------------+--------------+----------------------------+
     | ?a=é              | ?a=%C3%A9    | Parsing performs percent-  |
     |                   |              | decoding                   |
     +-------------------+--------------+----------------------------+
     | ?a=%f6            | ?a=%ef%bf%bd | Both values are parsed as  |
     |                   |              | U+FFFD (�)                 |
     +-------------------+--------------+----------------------------+
     | ?a=x&&&&          | ?a=x         | Parsing splits on & and    |
     |                   |              | discards empty strings     |
     +-------------------+--------------+----------------------------+
     | ?a=               | ?a           | Both parse as having an    |
     |                   |              | empty string value for a   |
     +-------------------+--------------+----------------------------+
     | ?a=%20            | ?a= &        | %20 is parsed as U+0020    |
     |                   |              | SPACE                      |
     +-------------------+--------------+----------------------------+
     | ?a=+              | ?a= &        | + is parsed as U+0020      |
     |                   |              | SPACE                      |
     +-------------------+--------------+----------------------------+

And without:

         +==========+==============+============================+
         | Query A  | Query B      | Explanation                |
         +==========+==============+============================+
         | null     | ?            | A null query is parsed the |
         |          |              | same as an empty string    |
         +----------+--------------+----------------------------+
         | ?a=x     | ?%61=%78     | Parsing performs percent-  |
         |          |              | decoding                   |
         +----------+--------------+----------------------------+
         | ?a=é     | ?a=%C3%A9    | Parsing performs percent-  |
         |          |              | decoding                   |
         +----------+--------------+----------------------------+
         | ?a=%f6   | ?a=%ef%bf%bd | Both values are parsed as  |
         |          |              | U+FFFD (�)                 |
         +----------+--------------+----------------------------+
         | ?a=x&&&& | ?a=x         | Parsing splits on & and    |
         |          |              | discards empty strings     |
         +----------+--------------+----------------------------+
         | ?a=      | ?a           | Both parse as having an    |
         |          |              | empty string value for a   |
         +----------+--------------+----------------------------+
         | ?a=%20   | ?a= &        | %20 is parsed as U+0020    |
         |          |              | SPACE                      |
         +----------+--------------+----------------------------+
         | ?a=+     | ?a= &        | + is parsed as U+0020      |
         |          |              | SPACE                      |
         +----------+--------------+----------------------------+

I think that the latter is better.

Suggested change
| Query A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Query B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Reason for Equivalence |
| Query A | Query B | Explanation |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated to remove some of the extra spaces in the first column, so if you look at the generated HTML, this is what it looks like with:
Screenshot 2026-01-06 at 14 57 26
and what it looks like without any &nbsp;:
Screenshot 2026-01-06 at 14 49 02

The first one seemed preferable, and generated .txt version looks okay too:

      +===========+===================+============================+
      | Query A   | Query B           | Explanation                |
      +===========+===================+============================+
      | null      | ?                 | A null query is parsed the |
      |           |                   | same as an empty string    |
      +-----------+-------------------+----------------------------+
      | ?a=x      | ?%61=%78          | Parsing performs percent-  |
      |           |                   | decoding                   |
      +-----------+-------------------+----------------------------+
      | ?a=é      | ?a=%C3%A9         | Parsing performs percent-  |
      |           |                   | decoding                   |
      +-----------+-------------------+----------------------------+
      | ?a=%f6    | ?a=%ef%bf%bd      | Both values are parsed as  |
      |           |                   | U+FFFD (�)                 |
      +-----------+-------------------+----------------------------+
      | ?a=x&&&&  | ?a=x              | Parsing splits on & and    |
      |           |                   | discards empty strings     |
      +-----------+-------------------+----------------------------+
      | ?a=       | ?a                | Both parse as having an    |
      |           |                   | empty string value for a   |
      +-----------+-------------------+----------------------------+
      | ?a=%20    | ?a= &             | %20 is parsed as U+0020    |
      |           |                   | SPACE                      |
      +-----------+-------------------+----------------------------+
      | ?a=+      | ?a= &             | + is parsed as U+0020      |
      |           |                   | SPACE                      |
      +-----------+-------------------+----------------------------+

@nidhijaju nidhijaju merged commit 01f0de2 into httpwg:main Jan 14, 2026
1 check passed
@nidhijaju nidhijaju deleted the fix-comparison-examples branch January 14, 2026 01:53
@reschke
Copy link
Contributor

reschke commented Jan 14, 2026

FWIW: puttig nbsps into the source code to optimize HTML output sounds very wrong (this is an xml2rfc/kramdown comment). It should not be needed.

@martinthomson
Copy link
Contributor

I agree with Julian. Have you considered "First Query", "Second Query"?

@reschke
Copy link
Contributor

reschke commented Jan 14, 2026

FWIW, I removed the nbesps, and xml2rfc's output is:

grafik

So maybe it's just a CSS problem? In any case, no reason for these kinds of workarounds.

@martinthomson
Copy link
Contributor

It's a CSS issue, at least in part. xml2rfc will do the same if the window is narrow enough. The problem is a lack of a means of signaling that you want less wrapping.

You can avoid the wrapping with less text in the third column, a wider table, or many other things. But what we really need is something like a wrap-avoiding span element.

@nidhijaju nidhijaju mentioned this pull request Jan 15, 2026
@nidhijaju
Copy link
Contributor Author

Thanks for the feedback, just merged #3381 to remove the &nbsps and use "First Query" and "Second Query".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Styling of comparison examples

3 participants