YAFLogo

Dr-Hack
  • Dr-Hack
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
8 years ago
Hello,

so i updated to YAF 2.2.2 under DNN yesterday , today noticed a glitch.

Action :

Forum names having the character "&" in them doesnt end up good in the friendly urls .

Reaction:

"&" gets replaced with a space in url (%20)

Screenshot :

UserPostedImage

this is happening with Forum names and which links which has & character

Solution :

1. I change the forum name ? , but it will effect the google links ?

2. wait for a dev to guide me where i have gone wrong .

Anyone else got this issue ?

thanks

Sponsor
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
8 years ago
That is supposed to happen because the ampersand is utilized for QueryStrings. You should never see the & in the URL for that reason.

Overview of Query Strings

https://en.wikipedia.org/wiki/Query_string 

Overview of URL Encoding

http://www.w3schools.com/tags/ref_urlencode.asp 

Dr-Hack
  • Dr-Hack
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
8 years ago

That is supposed to happen because the ampersand is utilized for QueryStrings. You should never see the & in the URL for that reason.

Originally Posted by: Zero2Cool 

yes but replacing it with a SPACE (%20) thats not the right option , as visible in the screenshot attached above

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
8 years ago

That is supposed to happen because the ampersand is utilized for QueryStrings. You should never see the & in the URL for that reason.

Originally Posted by: Dr-Hack 

yes but replacing it with a SPACE (%20) thats not the right option , as visible in the screenshot attached above

Originally Posted by: Zero2Cool 

What do you mean it is not the right option? I guess I'm failing you here, sorry. It would make sense that the & gets replaced with Space for the purpose of query strings. You should never have an ampersand in the URL because it would conflict with the query string functionality.

That's why all characters not alphanumeric should be replaced with dashes or spaces. And actually I think the & is supposed to be replaced with - in that instance.

Edit, o_O the portion after the & is being disregarded in the URL.

The URL should be encoded from

New Members & Introductions

to

New-Members---Introductions

At least that's how it's working on my site for such titles.

Dr-Hack
  • Dr-Hack
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
8 years ago

The URL should be encoded from

New Members & Introductions

to

New-Members---Introductions

At least that's how it's working on my site for such titles.

Originally Posted by: Zero2Cool 

YES ,exactly on my Friendly URL any forum topic which has "&" becomes something like : site.com/Forum/tabid/11/g/topics/f/7/introductions/ /New-Members.aspx

but where do i look to fix this on mine ? Issue is i moved my hosting and updated yaf to 2.2.2 so it happened simultaneously now cant point to the error