Bug: Share btn improperly working in Preview Tool on click
Checks
- [x] I have thoroughly read and understand The Odin Project Contributing Guide
- [x] The title of this issue follows the
Bug: brief description of bugformat, e.g.Bug: Lesson complete button does not update on click - [ ] Would you like to work on this issue?
Bug description
In the markdown preview tool, the share button works normally on simple texts where it would show the share preview link when the button is clicked. But when pasting the content from the given assignment, the share preview link does not appear anymore.
The source of the pasted content is in the given assignment, fourth item, in Ruby - Files and Serialization lesson. From there, it is advised to copy the contents from the pastebin, and paste it in the markdown preview tool.
How to reproduce
- Visit the markdown preview tool.
- Copy the contents of the pastebin, provided by the assignment.
- Click the share button. It doesn't matter whether you are on the Write or Preview tab.
- The share preview link does not appear.
Expected behavior
- Visit the markdown preview tool.
- Copy the contents of the pastebin, provided by the assignment.
- Click the share button. It doesn't matter whether you are on the Write or Preview tab.
- The share preview link should appear.
What browsers are you seeing the problem on?
Chrome, Firefox, Other, Microsoft Edge
What OS are you using?
Windows, Ubuntu
Discord Name
Koko
Additional Comments
No response
Thanks for reporting @Monatric, I wasn't aware we were using the preview tool for that. The preview tool is only designed to work with our lesson markdown, I think we should probably swap out that resource or remove it instead making learners jump through hoops with pastebin and the markdown preview workaround.
But there is a bug here, our CDN is blocking the share button when there's code in the payload - it thinks it's an injection attack. I'll look into this one.
This should be fixed now 👍