On , DEV Community member Jono Yeong joined Christina and I on the pairing stream to work on an issue related to wanting to render HTML tags as text.
Here is the issue that we were working on:
Certain characters, like angle brackets, show up incorrectly in some article previews #2204
Describe the bug
When viewing the /comments
view of an article, the first line and a half or so of the article is displayed. If that first bit contains inline code with angle brackets, e.g. if you wrote:
this is an article about `<span>` tags
this appears in the article preview as: "this is an article about <span> tags".
To Reproduce Steps to reproduce the behavior:
- Go to 'https://dev.to/new'.
- Enter minimal front matter, set `published: true, and enter:
this is an article about `<span>` tags
- Save the article.
- Navigate to {article URL}/comments.
- Observe the
<span>
in the preview text.
Expected behavior
I expect the preview to say "This is an article about <span>
tags"
Screenshots Example from: https://dev.to/kenbellows/stop-using-so-many-divs-an-intro-to-semantic-html-3i9i/comments
Desktop (please complete the following information):
- OS: macOS Mojave 10.14.3
- Browser: Chrome 72.0.3626.121, Opera 58.0.3135.107
On this stream, we covered:
- Debugging tools in the browser, which helped us solve the issue
- Cross Site Scripting (XSS) mitigation -- a security in place that was causing the issue we were working on.
- How to retain security best practices while still allowing this issue to be fixed.
Thanks again for coming on the stream, Jono!
You can also find the three of us all over the web here:
Jono:
Nick:
Christina:
Looking forward to seeing you on future streams! If you're interested in pairing, fill out this form. We’d love to tackle an issue with you that the whole community could learn from!
P.S. Follow DEV on Twitch to be notified when future streams begin and catch old streams on YouTube
Top comments (4)
Woohoo so many learnings! Thanks for having me.
Wow this is really cool!
Saaaweeeeet! thanks for coming on Jonathan!