YAFLogo

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
8 years ago
If the URL has the "~" in it, it is not parsed correctly.

Example:

http://www.example.com/data/~/full-details.html 

The text after ~ is not been hyperlinked.

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
8 years ago
Tilde signs should not be used in urls (Explanation here )

But can encode the ~ sign as %7E, then it will work.

http://www.example.com/data/%7E/full-details.html 

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
8 years ago
I am linking to third party site (US Government website). Hence I have no control over how they create the URL.

In the link you posted above, according to latest RFC 2396, tilde character is considered safe and is allowed.

Thantis
  • Thantis
  • 81.8% (Honored)
  • YAF Commander
8 years ago
If you read the whole article it also says that while the standard has changed to allow it, its still not 100% compatible, since I am sure stability is a priority it still matters.
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
8 years ago
It should be a simple regex fix. Stability of forum should not be affected.

We can alternately convert tilde to the %7E character (by using regex) when creating the hyperlink.


http://www.example.com/data/~/full-details.html

hyperlinks to either

a. http://www.example.com/data/~/full-details.html
b. http://www.example.com/data/%7E/full-details.html

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
8 years ago
urls with ~ should be parsed correctly now.