When linking to resources I prefer to use named anchors (if available), so people don't have to go searching for what exactly I'm referring to on the linked page.  With the shortcut [mod://], however, this doesn't seem to be possible, because special characters like # or % are being URI-escaped, which produces hrefs that don't work (example).

I typically end up using a generic [http://...] with a URI like what would be created by [mod://]:

[http://search.cpan.org/perldoc?pp#-a,_--addfile=FILE%7cDIR|my link +text]

(which doesn't have the problem), but it would be nice to have it working directly with the shortcut in the first place, i.e.

[mod://pp#named-anchor|my link text]

(as it is, it typically takes two steps for me, because I don't seem to be able to remember the exact URI that's being generated by the shortcut...)

So I'm wondering if there is a way to somehow quote/escape special characters (such that they aren't URI-escaped by PM), or what's the proper way to link to anchors.  Or is this maybe a browser issue? (I'm using Firefox)

(My apologies in case this has already been discussed — a quick search turned up a number of nodes, but none of those did really apply to this specific issue.)


In reply to [mod://] shortcut with named anchors by almut

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.