-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
02a86ce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stupid question, but if you decode before stripping tags, won't you just delete something like
<code><meta name="foo" value="bar"></code>
, e.g., if a blog post contained example code?If you trust Mastodon to properly escape HTML (which I think it does), then shouldn't you first strip tags (removing only the
code
tags in the example above), and then decode the remaining entities?Edit: Maybe it doesn't matter, I'm just now seeing this is about the summary/title only.
02a86ce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is only for the fields that should be plain text. Maybe we can change that for the summary a bit later on.