-
Notifications
You must be signed in to change notification settings - Fork 238
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
Sanitize mentions in cleanup (prior to role logic) #92
Conversation
Per DM, opening PR. Sanitizes mentions in the raw article via. the `cleanup` function with a zero-width space. This makes all mentions (such as `@everyone` - that could be contained in the RSS body) not get triggered on Discord but does not affect the output, nor has any impact on subscribed roles, as that logic is done after this cleanup.
Good catch, but what is the purpose of this? |
An additional safety check that sanitizes markdown-enclosed stuff, so `@hello` would be caught by adding a zero-width after `, and then adding the zero-width after |
Ah so you're escaping backticks as well - in that case, did you mean to do
then? A single backslash unnecessarily escapes the backtick, which is just equivalent to a backtick rather than a backslash and a backtick |
I may be misexplaining it. Pictures are worth a thousand words they say, so here's a few:
|
It doesn't matter much here, from the standpoint that this is an edge case. I'll remove that now. |
Per DM, opening PR. Sanitizes mentions in the raw article via. the
cleanup
function with a zero-width space. This makes all mentions (such as@everyone
- that could be contained in the RSS body) not get triggered on Discord but does not affect the output, nor has any impact on subscribed roles, as that logic is done after this cleanup.