member pages with @ in user name

Eric Garrison asked on May 7, 2018 04:51

I am working on a site that was built based on the community template. It is using the Member pages linked to a member list. The user who have user names are ok, but those who use email address as user name get a 404. It is because the @ sign in the URL. The URLs are generated by this: <a href="<%# HTMLEncode(GetMemberProfileUrl(Eval("UserName"))) %>">

It looks like the out of the box logic. It is not working properly. What is the best way to correct this?

I was considering changing to use UserID and pull the users by that. I want the users to be able to edit their own info also.

Recent Answers

Brenden Kehren answered on May 7, 2018 05:08

URL encode it before you html encode it. You're encoding the @ when you should be encoding %40.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.