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

404 on certain pages even when html view exists #51

Open
ToucheSir opened this issue Mar 7, 2021 · 6 comments
Open

404 on certain pages even when html view exists #51

ToucheSir opened this issue Mar 7, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@ToucheSir
Copy link

ex. https://juliacommunity.github.io/zulip-archive/stream/274208-helpdesk-(published)/topic/.60eachline(.3A.3AIOBuffer).60.20for.20other.20delimiters.html (source at https://github.com/JuliaCommunity/zulip-archive/blob/master/274208-helpdesk-(published)/topic/.60eachline(.3A.3AIOBuffer).60.20for.20other.20delimiters.html)

I speculate this has something to do with the leading . (generated in this case by the post-URLencoding % -> . replacement). Does Jekyll have some special logic for this that is tripping things up?

@ToucheSir
Copy link
Author

It's been pointed out to me that the relevant logic lives in

zulip-archive/lib/url.py

Lines 62 to 64 in bcd29a1

# create a unique sanitized identifier for a topic
def sanitize_topic(topic_name):
return urllib.parse.quote(topic_name, safe='~()*!.\'').replace('.','%2E').replace('%','.')
. Is there any benefit to using this solution over a known 3rd-party library like https://github.com/un33k/python-slugify?

@timabbott timabbott added the bug Something isn't working label Mar 8, 2021
@timabbott
Copy link
Member

I'm not sure -- I think @showell or @rht might have thought more about the URL-encoding for zulip-archive than I have?

I think part of the complexity here is that this wants to agree with the URL-encoding methods used by the Zulip webapp.

refeed added a commit to refeed/zulip-archive that referenced this issue Jul 6, 2022
Use similar implementation of how zulip sanitizes its stream name and
URL into a safe URL.
The only difference is the function now append a non-dot char as the
prefix so that it is safe to use as the filename especially for jekyll
usecase where it ignores file that has dot prefix in its filename.

Closes zulip#35
Closes zulip#51
@refeed
Copy link
Member

refeed commented Aug 16, 2022

I think this can be closed as we don't use jekyll anymore.

@alya
Copy link
Contributor

alya commented Sep 6, 2022

I think this can be closed as we don't use jekyll anymore.

@rht perhaps you could close this issue if you agree? Thanks!

@rht
Copy link
Contributor

rht commented Sep 6, 2022

I don't have admin right to close the issue, but I agree with @refeed. The issue is fixed by 78da21b.

@rht
Copy link
Contributor

rht commented Sep 6, 2022

Though it's because of the URL encoding, not specifically Jekyll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants