Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add external link with params? #161

Open
Reksy opened this issue Oct 20, 2016 · 2 comments
Open

How to add external link with params? #161

Reksy opened this issue Oct 20, 2016 · 2 comments

Comments

@Reksy
Copy link

Reksy commented Oct 20, 2016

Hi, guys!

I try to sent recovery password link with 2 params, code and userId.

So callbackUrl when ForgotPasswordEmail is initialize look like this:
https://sitename/Account/ResetPassword?userId=blablabla&code=blabla.

In view i try to put it like:
@Model.callbackURL
or
<a href='@Model.callbackUrl'>

But when I open email in the client the link is:
https://sitename/Account/ResetPassword?userId=blablabla&amp;code=blabla.

the symbol &amp; is not recognizing like & and in action I have just one not nullable param (userId).

How I should put the link?

@Priddybroderickson
Copy link

Hey there! To properly display the link, you can use HTML decoding for the ampersand symbol. Try using '@Html.Raw(HttpUtility.HtmlDecode(Model.callbackUrl))' in your view to decode the Website ampersand symbol and display the link correctly.

@jhonmike8
Copy link

"Hey there! Looks like you're dealing with an HTML encoding issue. Try using Html.Raw to render the link without encoding. Like this:

html
Copy code
Link Text
Hope this helps! Betflix #CodingChallenge #HTML"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants