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

Quasi-URI-encoded suggestion links #963

Merged
merged 1 commit into from Jul 10, 2023
Merged

Conversation

veloman-yunkan
Copy link
Collaborator

@veloman-yunkan veloman-yunkan commented Jul 1, 2023

Fixes #958

Before this fix suggestion links were built out of fully URI-encoded book name and article path components despite the fact that this measure was taken against only a few dangerous symbols such as '#', '?', '"' and '\'. However, URI-encoding the slash symbols in the path has some undesirable side-effects.

Henceforth only the problematic symbols are encoded in the article path component. The book name is still fully URI-encoded since I don't see any counter-arguments.

@codecov
Copy link

codecov bot commented Jul 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (60cce60) 38.87% compared to head (4d60b10) 38.87%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #963   +/-   ##
=======================================
  Coverage   38.87%   38.87%           
=======================================
  Files          56       56           
  Lines        3974     3974           
  Branches     2187     2187           
=======================================
  Hits         1545     1545           
  Misses       1097     1097           
  Partials     1332     1332           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Before this fix suggestion links were built out of fully URI-encoded
book name and article path components despite the fact that this measure
was taken against only a few dangerous symbols such as '#', '?', '"' and
'\'.  However, URI-encoding the slash symbols in the path has some
undesirable side-effects (see #958).

Henceforth only the problematic symbols are encoded in the article path
component. The book name is still fully URI-encoded since I don't see
any counter-arguments.
@veloman-yunkan veloman-yunkan force-pushed the quasiuriencoded_suggestion_links branch from d298026 to 4d60b10 Compare July 1, 2023 13:56
Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected ; thanks 👍

@kelson42 kelson42 merged commit 9599a31 into main Jul 10, 2023
13 of 14 checks passed
@kelson42 kelson42 deleted the quasiuriencoded_suggestion_links branch July 10, 2023 12:36
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

Successfully merging this pull request may close these issues.

URL encoding suggestion pathname's unintended side effect
4 participants