Skip to content

% characters are stripped out of URLs #1292

@donlzx

Description

@donlzx

The section variable passed into the pagination module is already URL encoded,

https://github.com/spf13/hugo/blob/master/hugolib/pagination.go#L370

but the pagination URLs are encoded again using function URLizeAndPrep() in

https://github.com/spf13/hugo/blob/master/hugolib/pagination.go#L515

This yields incorrect URLs for pagination templates.

For example, a section name contains accent characters (añame) encoded as a%C3%B1ame, when processed by function URLizeAndPrep(), will become ac3b1ame, the % characters are stripped out.

And there may be other cases for non-English section names which are not handled correctly.

Removing the call to the URLizeAndPrep() function temporarily fix this issue for me, but the URL handling should be reviewed and should be consistent with URLs in Nodes and Pages.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions