-
Notifications
You must be signed in to change notification settings - Fork 32
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
Remove Phlex version conditionals #187
Conversation
) | ||
end | ||
end | ||
pre { raw(safe(FORMATTER.format(lexer.lex(@code)))) } |
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.
I'm not sure if is recommended to flag code as safe by default. Our users can pass user generated content here and create a security breach. I think we should force the users to use safe
when passing content, so they will know what they are doing. I can open a new PR to change this.
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.
Yeah agreed but in this context is it not safe because we are limiting what is being passed as safe? It's only in the code component to render it.
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.
Good question. I will make some tests here.
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.
It’s an interesting debate. It may be cumbersome to require the user to call safe by himself on a code block. A code block component implies that the code will be interpreted. Let's keep that way for now.
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.
@SethHorsley @cirdes I think Rouge is escaping the code, so I think it is safe since we are using safe on rouge result and not on given code.
) | ||
end | ||
end | ||
pre { raw(safe(FORMATTER.format(lexer.lex(@code)))) } |
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.
It’s an interesting debate. It may be cumbersome to require the user to call safe by himself on a code block. A code block component implies that the code will be interpreted. Let's keep that way for now.
Remove legacy code checking Phlex version.