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

Categories with latin2 characters are not displayed in post meta #156

Closed
janicetr opened this issue Nov 20, 2019 · 5 comments
Closed

Categories with latin2 characters are not displayed in post meta #156

janicetr opened this issue Nov 20, 2019 · 5 comments
Labels
bug

Comments

@janicetr
Copy link

@janicetr janicetr commented Nov 20, 2019

Categories with latin2 character(s) are displayed properly in the categories widget, but do not show up in the post meta. Maybe a parsing issue? They are UTF-8 encoded in the front matter.

@Vimux

This comment has been minimized.

Copy link
Owner

@Vimux Vimux commented Nov 20, 2019

Hello,

This information is not enough to provide an accurate answer. Maybe you should add an example at least?

@janicetr

This comment has been minimized.

Copy link
Author

@janicetr janicetr commented Nov 20, 2019

Sorry. I made a screenshot. The "Hírek" category name contains an i with an acute accent. I tried some other acute and double acute characters, they have the same problem. The relevant span section in the generated html is empty. Windows x64 version Hugo running on Win10 x64.

mainroad

@Vimux

This comment has been minimized.

Copy link
Owner

@Vimux Vimux commented Nov 21, 2019

I reproduced this, but I'm not sure that this is the theme related issue. Briefly: the main problem that we can't get a page from a generated link that contains complex symbols. Related code line:

{{- with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
.GetPage just return noPage. Maybe .GetPage can't handle such cases correctly.

I don't have time to investigate this right now. I'll be back later, as soon as I have time for this. I will not mark this as a theme bug right now.

@Vimux Vimux added bug and removed NeedsInvestigation labels Nov 29, 2019
@Vimux

This comment has been minimized.

Copy link
Owner

@Vimux Vimux commented Nov 29, 2019

I prepared a bugfix for this.

I tried to follow the Hugo documentation example for taxonomy templates, but it should not be trusted right now, in this particular example, at least.

@janicetr, thank you for reporting this.

@Vimux Vimux closed this in 946a258 Nov 29, 2019
@Vimux Vimux reopened this Nov 29, 2019
@Vimux

This comment has been minimized.

Copy link
Owner

@Vimux Vimux commented Nov 29, 2019

Unfortunately, anchorize don't solve this bug completely:

foo(bar) | anchorize   ->   foo-bar
foo(bar) | urlize      ->   foobar

It means that tags like foo(bar) don't show up with previous fix 946a258. New fix should resolve both cases.

I prepared another fix. 😕


Big thanks to @reuixiy for clarification.

@Vimux Vimux closed this in 650ed32 Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.