Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Hex codes in links

by jo37 (Friar)
on Jun 21, 2020 at 14:02 UTC ( #11118311=monkdiscuss: print w/replies, xml ) Need Help??

The node 11118252 has a "special" link that contains a vertical bar (encoded as %7C). This link has been constructed by specifying the full href, as choroba told me in a private message. As the vertical bar cannot be used directly in a link at the monastery as it separates the location from the displayed text, it must be encoded in some way. Trying to use the path IO::Uncompress::Gunzip#Transparent-=>-0%7C1 with some shortcut schemas gives interesting results:

[metamod://IO::Uncompress::Gunzip#Transparent-=>-0%7C1] ->
points to nowhere (404)

[doc://IO::Uncompress::Gunzip#Transparent-=>-0%7C1] ->
links to the page, but not to the specified section

[mod://IO::Uncompress::Gunzip#Transparent-=>-0%7C1] ->
links to the specified section

<EDIT> and work just fine, when accessed with the original path component "as is". The example is misleading, as there are no anchors within the page. </EDIT>

All the generated links (except the full href) have one thing in common: The percent sign becomes encoded as %25. It depends on the target side if this will be interpreted in a useful way. I didn't find any documentation on how to include a hex encoded value in a link. Obviously it is handled different in a full href. Is this a bug or is it a feature? If it's a feature, then another feature might be missing: including hex codes in a path.



Replies are listed 'Best First'.
Re: Hex codes in links
by Anonymous Monk on Jun 21, 2020 at 17:31 UTC
    Linking shortcuts are for monkeys to type. Anchors were never portable between different targets. If you want anchors copy url from browser bar after clicking

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://11118311]
Approved by hippo
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2020-12-02 16:56 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (44 votes). Check out past polls.