dis-moi / dis-moi/backend

Contribution from extension : matching only the page targeted, not all pages starting by

Open
#461 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Problem**
Currently, when an web extension user contributes it creates a mathing context too large. It target the page and all pages starting with same characters.
Currently it is not a problem because contribution team is moderating contributions before publishing.
Tomorrow with https://github.com/dis-moi/backend/issues/459, it will be directly published.

For example
if I am on https://www.direct-assurance.fr/ when I contribute
it creates as matching context :
- websiste : `www.direct-assurance.fr`
- regex :` /`

**Solution**
Add `/?(\?.*)?$` at the end of regex to not match with other pages of the same website
Fo example
if I am on https://www.direct-assurance.fr/ when I contribute
it creates as matching context :
- websiste : `www.direct-assurance.fr`
- regex :` /?(\?.*)?$`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.