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

Allow unicode characters for package routes #2179

Merged
merged 1 commit into from
Apr 22, 2021
Merged

Conversation

fiskus
Copy link
Member

@fiskus fiskus commented Apr 21, 2021

Python RegExp slightly different from Javascript. In Python's \w Unicode is included, in JavaScript - ASCII only:
Screenshot from 2021-04-21 19-01-11

There is a special characters sequence to match any Unicode symbol: \p{L}, but to match Unicode symbols RegExp should be called with 'u' flag. "path-to-regexp" (library behind "react-router") doesn't use it: https://github.com/pillarjs/path-to-regexp/blob/79a5dcf5f2a79a99fbaaccae20cd922a745e0f83/index.js#L261

As a workaround, I allowed any character. Results are:

Screenshot from 2021-04-21 19-09-40
Screenshot from 2021-04-21 19-09-59
Screenshot from 2021-04-21 19-10-07

@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #2179 (95b1d30) into master (bb239ad) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2179   +/-   ##
=======================================
  Coverage   47.42%   47.42%           
=======================================
  Files         441      441           
  Lines       21138    21138           
  Branches     2436     2436           
=======================================
  Hits        10024    10024           
  Misses      10206    10206           
  Partials      908      908           
Flag Coverage Δ
api-python 89.85% <ø> (ø)
catalog 16.30% <0.00%> (ø)
lambda 93.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
catalog/app/constants/routes.js 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb239ad...95b1d30. Read the comment docs.

@fiskus fiskus requested a review from nl0 April 22, 2021 08:23
@fiskus fiskus merged commit c7be17c into master Apr 22, 2021
@fiskus fiskus deleted the unicode-path-regexp branch April 22, 2021 12:08
nl0 added a commit that referenced this pull request Apr 23, 2021
* master:
  Allow unicode characters for package routes by allowing any character (#2179)
  Additional NotFoundPage scoped to Bucket (#2175)
  Docs: fix catalog config path (#2168)
  rework pkgpush auth (#2170)
  Use AWS credentials for directory package and copy package submit (#2172)
  Document package push limitations in catalog [ci skip] (#2161)
  Preview warnings accordion (#2167)
  tweak warning text (#2169)
  Copy tweaks (#2164)
  Don't crash pkgselect for empty manifests (#2147)
  add codecov config (#2155)
nl0 added a commit that referenced this pull request May 4, 2021
* master: (54 commits)
  Use stable nginx version for catalog image (#2182)
  Ability to add S3 folders / files to package (#2171)
  lambda for adding S3 data to existing package (#2180)
  use github tarball for faster installation (#2181)
  Bump py from 1.7.0 to 1.10.0 in /lambdas/es/indexer (#2176)
  Bump py from 1.8.0 to 1.10.0 in /lambdas/s3select (#2177)
  Bump py from 1.8.0 to 1.10.0 in /lambdas/thumbnail (#2178)
  Allow unicode characters for package routes by allowing any character (#2179)
  Additional NotFoundPage scoped to Bucket (#2175)
  Docs: fix catalog config path (#2168)
  rework pkgpush auth (#2170)
  Use AWS credentials for directory package and copy package submit (#2172)
  Document package push limitations in catalog [ci skip] (#2161)
  Preview warnings accordion (#2167)
  tweak warning text (#2169)
  Copy tweaks (#2164)
  Don't crash pkgselect for empty manifests (#2147)
  add codecov config (#2155)
  Simplify warning messages for package name (#2134)
  Move package API requests to one file, consolidate naming and internal API (#2154)
  ...
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.

2 participants