URL with brackets ( ) not fully hyperlinked
ConversazioniBug Collectors
Iscriviti a LibraryThing per pubblicare un messaggio.
1mr.philistine
Greetings!
LT does not fully hyperlink this URL: https://en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)
As you can see above, "(musical)" is not linked.
However hyperlinking a text or image with the same URL works fine:
This way to the LOTR musical ♫ 🎶
This works fine.This works fine too.
If you permit me 2 more questions...
LT does not fully hyperlink this URL: https://en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)
As you can see above, "(musical)" is not linked.
However hyperlinking a text or image with the same URL works fine:
This way to the LOTR musical ♫ 🎶
This works fine.This works fine too.
If you permit me 2 more questions...
- Text inserted before and after the <img> tag appear on either side of the image. Is this by design? How to make text appear above or below the image with vertical line spacing? Apparently something is 'broken' in LT since 2009 according to this post and I do not understand the suggested fix: https://www.librarything.com/topic/80911#1708770
- The following syntax works without the use of " " (quotation marks). Is there a reason for using them?
<A HREF="https://www.librarything.com/home">text</A>
2Nevov
I don't know all the reasoning, but if you formulate a link using %28 and %29 instead of the parentheses it will work, despite appearances it will get you to the intended destination:
https://en.wikipedia.org/wiki/Lord_of_the_Rings_%28musical%29
There's some information about this, called percentage-encoding, at: https://en.wikipedia.org/wiki/Percent-encoding
You can do some shenanigans to trick the forum into displaying the URL in its more visually appealing version:
1. take the original URL and wrap it in <a> tags containing the percent-encoded version:
<a href="https://en.wikipedia.org/wiki/Lord_of_the_Rings_%28musical%29">https://en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)</a>
2. the forum still tries to interpret this and cuts off the (musical) but adding some formatting tags (<b>, or <i>) in the middle will interfere with the automatic generation, and hey presto you are left with a beautiful URL:
<a href="https://en.wikipedia.org/wiki/Lord_of_the_Rings_%28musical%29">https://<b></b>en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)</a>
Gives: https://en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)
Sorry I can't help with the images though.
https://en.wikipedia.org/wiki/Lord_of_the_Rings_%28musical%29
There's some information about this, called percentage-encoding, at: https://en.wikipedia.org/wiki/Percent-encoding
You can do some shenanigans to trick the forum into displaying the URL in its more visually appealing version:
1. take the original URL and wrap it in <a> tags containing the percent-encoded version:
<a href="https://en.wikipedia.org/wiki/Lord_of_the_Rings_%28musical%29">https://en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)</a>
2. the forum still tries to interpret this and cuts off the (musical) but adding some formatting tags (<b>, or <i>) in the middle will interfere with the automatic generation, and hey presto you are left with a beautiful URL:
<a href="https://en.wikipedia.org/wiki/Lord_of_the_Rings_%28musical%29">https://<b></b>en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)</a>
Gives: https://en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)
Sorry I can't help with the images though.
3mr.philistine
>2 Nevov: Thanks very much for taking the time to explain things.
Also using <code> tags displayed the following anomalies:
Also using <code> tags displayed the following anomalies:
- no https:// displays the URL without hyperlink (as intended).
<code>en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)</code>
en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)
- with https:// still displays the partial hyperlink.
<code>https://en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)</code>
https://en.wikipedia.org/wiki/Lord_of_the_Rings_(musical)
As we await the Bug Master's touch, do you know any resources that collect all HTML codes used on LT? I was able to find the following (in no particular order of importance):
https://www.librarything.com/topic/177029
https://www.librarything.com/topic/35356
https://www.librarything.com/topic/129158
https://www.librarything.com/topic/80911
https://wiki.librarything.com/index.php/Basic_HTML_/_How_to_do_Fancy_Things_in_Y...
https://www.freeformatter.com/html-escape.html
4conceptDawg
Fixed.
5mr.philistine
>4 conceptDawg: Thank you very much! Forgive my impertinence, but what did the fix involve?
6conceptDawg
>5 mr.philistine: It's actually a rollback of a another fix. Our link-checking code was filtering out parens because a lot of people like to put links inside parenthesis in talk when they mention a link (like here) but our link checker removed the parens so that they wouldn't be included in the links in those cases. Parens are a legal character in links so we shouldn't necessarily do that and I've done a regression to that code and plan to go back and do a smarter checker for parens.
7fuzzi
>6 conceptDawg: not sure if this is related, but some of the urls on my book thread that are in parentheses are no longer links, see this post as an example:
https://www.librarything.com/topic/347135#8017704
https://www.librarything.com/topic/347135#8017704
8mr.philistine
>7 fuzzi: Inserting a space after/ before the link within the parentheses recreates the hyperlink like this example..
(https://www.librarything.com/topic/341255)
( https://www.librarything.com/topic/341255 )
(https://www.librarything.com/topic/341255)
( https://www.librarything.com/topic/341255 )
9AnnieMod
>8 mr.philistine: Yes, that works of course but it was needed before the fix was implemented so all old posts are now... not linking. :)