Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Forum Unicode Translation #250

Open
prockallsyms opened this issue Oct 30, 2019 · 0 comments
Open

Forum Unicode Translation #250

prockallsyms opened this issue Oct 30, 2019 · 0 comments

Comments

@prockallsyms
Copy link
Contributor

prockallsyms commented Oct 30, 2019

This problem has been shown by Feuerstein on the site:
Cap1

The forum post with the ladybugs as the title is correctly rendered on the main screen, however, the link to the post does not follow correct standards:
Normal link:
https://www.hackthis.co.uk/forum/place/of/the/thread/[id]-name-of-the-post?page=(latest:[0-9])
Bugged link:
https://www.hackthis.co.uk/forum/place/of/the/thread/[id]?page=(latest:[0-9])

The name of the post is omitted from the link, resulting in a broken link.
This is due to the slug generation function not being compatible with Unicode values:
https://github.com/HackThis/hackthis.co.uk/blob/71f42ac847adb4ade26f3a76ca7083b1bacda0ab/files/class.utils.php#L102-L109

The above function is referenced here when creating a new thread:
https://github.com/HackThis/hackthis.co.uk/blob/71f42ac847adb4ade26f3a76ca7083b1bacda0ab/files/class.forum.php#L422

On a side note, in further development, we will also have to address the way the website utilizes those links. One particular place would be here:
https://github.com/HackThis/hackthis.co.uk/blob/71f42ac847adb4ade26f3a76ca7083b1bacda0ab/html/forum/index.php#L21

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

No branches or pull requests

1 participant