-
Notifications
You must be signed in to change notification settings - Fork 27
fix: bind empty message string as plain text to avoid xss #216
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
base: master
Are you sure you want to change the base?
fix: bind empty message string as plain text to avoid xss #216
Conversation
328ecee
to
850a3a2
Compare
Makes sense. Can you just please enhance you breaking change note: (but remove the )
|
850a3a2
to
ce92057
Compare
BREAKING CHANGE: `emptyMessage` is no longer interpreted as HTML to prevent XSS attacks. Use content projection for displaying an HTML empty content message: ``` <ngx-datatable> <div empty-content> My rich <i>html</i> content. </div> </ngx-datatable> ```
ce92057
to
15084c5
Compare
After thinking a little longer about: this could actually be very annoying for apps, that used to provide some HTML as config on a global level. Since I agree, that we should not have this, I thought about maybe adding support to provide a component on a global level for empty content. |
I am bit in doubt here if applications would be using a generic html as empty content. It might not make any sense to have such thing in large applications having different feature based tables. e.g application might have a page which list all the users where it says |
@spike-rabbit as we also quickly talked offline about this: I think this change is for our internal applications not that problematic as they pretty much exclusively rely on Lines 18 to 24 in f0fb0fb
I'm therefore also more in favor of finding a longer-term solution that would probably help us too in reducing duplication and fostering alignment. |
BREAKING CHANGE:
emptyMessage
no longer allow passing html to prevent XSS attacks. use slot based content projectionempty-content
for displaying html rich empty content message.What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
What is the new behavior?
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: