s/is/is not/. In IE, I can see this by simply hovering over each of latter two links, while FireFox tries to be "friendly" and hides the difference from me. But if you view the source, you will see:

<a href="http://en.wikipedia.org/wiki/Special:Search?search=Perl%23fut +ure"> vs. <a href="http://en.wikipedia.org/wiki/Perl#Future">

And the important difference is not most of the difference there, just the difference between "%23" and "#".

The former of those only works because Wikipedia special-cases that search and redirects to a URL that includes the anchor that is part of the search terms in the URL that PerlMonks produces. And you can test the effect by going to Wikipedia and typing "perl#future" into the search box and submitting.

Of course, I proposed years ago that we make some clean-up to link parsing which includes making anchors work on most link types (since they work on almost none of them now). So I'd like to see the implementation of that proposal get finished (it was started but one of the gods disliked the idea and so I never finished debugging what I had written).

And a funny thing is that "fixing" this would actually break the second case. I wasn't sure, since the search of Wikipedia involves a redirect, when the anchor is included as an actual anchor, would the anchor be lost when the redirect happens. In IE, the anchor is lost. In FireFox, the anchor gets shown in the browser address bar after the redirect, but the anchor doesn't actually work (you end up at the top of the Perl page in either browser).

So, after fixing the general case (so that #blah gets emitted as an anchor while \#blah encodes the # to be part of the pre-anchor URL) we should special-case wp:// (then consider other cases like doc://$# vs doc://perlop#Shift-Operators).

- tye        


In reply to Re: Problem with id:// shortcuts and anchors (care) by tye
in thread Problem with id:// shortcuts and anchors by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.