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

[BUGFIX] utilise un nouveau composant pour afficher le markdown (pix-12552) #8947

Merged
merged 2 commits into from
May 21, 2024

Conversation

lionelB
Copy link
Contributor

@lionelB lionelB commented May 16, 2024

🦄 Problème

On souhaite améliorer la gestion des règles de transformation du html du composant MarkdownToHtml, or celui ci est difficilement paramétrable

🤖 Proposition

On implémente un nouveau composant pour avoir la main sur la transformation html

🌈 Remarques

On a dupliqué le composant dans admin (mais sous la forme classique (fichiers hbs + js)

💯 Pour tester

sur orga

  • se connecter dans orga
  • créer une nouvelle campagne
  • mettre du markdown et essayer d'injecter du javascript
  • constater l'affichage du contenu

sur admin

  • se connecter dans admin
  • créer un profil cible
  • mettre du markdown et essayer d'injecter du javascript
  • constater l'affichage du contenu

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@lionelB lionelB force-pushed the PIX-12552/fix-markdown-html branch from 3070d43 to 547702b Compare May 16, 2024 14:02

// then
assert.ok(screen.getByRole('link', { name: 'monpix' }));
assert.ok(screen.getByText(/toto/));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ici on valide que la balise est transformé en texte (idem pour script)

Copy link
Contributor

Choose a reason for hiding this comment

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

<toto\/> pour valider que c'est sanitize ?

Copy link
Contributor

Choose a reason for hiding this comment

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

edit : le get by text suffit.

@Alexandre-Monney
Copy link
Contributor

Test fonc(Lionel) ok ! Plus possible d'injecter du JS dans les champs incriminés ✅

@xav-car xav-car changed the title [FIX] utilise un nouveau composant pour afficher le markdown (pix-12552) [BUGFIX] utilise un nouveau composant pour afficher le markdown (pix-12552) May 17, 2024
@xav-car xav-car added Func Review OK PO validated functionally the PR and removed 👀 Func Review Needed labels May 17, 2024
@lionelB lionelB self-assigned this May 21, 2024
@lionelB lionelB force-pushed the PIX-12552/fix-markdown-html branch from f4f18b8 to 6a85f4a Compare May 21, 2024 06:56
@@ -133,5 +132,9 @@
"striptags": "^3.2.0",
"stylelint": "^16.0.0",
"webpack": "^5.90.3"
},
"dependencies": {
Copy link
Contributor

Choose a reason for hiding this comment

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

en dev ? 🤔

@lionelB lionelB force-pushed the PIX-12552/fix-markdown-html branch from ad88b5f to 4e207f1 Compare May 21, 2024 09:31
@pix-service-auto-merge pix-service-auto-merge merged commit 82d5aec into dev May 21, 2024
7 of 8 checks passed
@pix-service-auto-merge pix-service-auto-merge deleted the PIX-12552/fix-markdown-html branch May 21, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants