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

URL with named anchor not localising #372

Closed
Thrudd opened this issue Jul 6, 2018 · 3 comments
Closed

URL with named anchor not localising #372

Thrudd opened this issue Jul 6, 2018 · 3 comments

Comments

@Thrudd
Copy link

Thrudd commented Jul 6, 2018

I've hit a snag thats got me stumped and I'm not sure if its a bug or just some limitation that I'm unaware of.

My issue is that I've made a html helper using MergeAttribute to generate a menu eg:
link.MergeAttribute("href", menuItem.URL);
It works as expected unless the URL includes a named anchor.

So '/testpage' correctly becomes '/en/testpage' but '/testpage#foo' just gets rendered as '/testpage#foo'

Could it be that the URL with the anchor is failing the regex in EarlyUrlLocalizer.cs? I'm hopeless at regex so I really can't tell (It's a dark art I've never managed to get my head around) or could something else be tripping it up?

@turquoiseowl
Copy link
Owner

Yes, it was a bug. Hopefully fixed now. Let me know if not.

New release 2.1.13 just published with the fix.

@Thrudd
Copy link
Author

Thrudd commented Jul 9, 2018

Ah great stuff. Yeah that sorted it out. Glad I found a bug, I really thought I'd missed something.
Thanks for all your hard work on i18n it's fantastic.

@turquoiseowl
Copy link
Owner

Good to know, thanks.

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

2 participants