-
-
Notifications
You must be signed in to change notification settings - Fork 71
Description
There have been a lot of question on Discord and Meta about posts being different from what was shown in the preview. Currently, due to the way we handle submissions, differences between the post preview and the actual post comes from sanitization.
Could we have something that automatically detects when the sanitizer would remove content, and inform the user? We could do this either client-side or server side.
On the client side, we could have a script to detect when the preview contains disallowed tags and attributes, in accordance with https://meta.codidact.com/posts/277420. This would give live feedback, but could suffer from any discrepancies between the "client sanitizer" and the true sanitizer.
On the server side, we check that the submitted HTML is the same before and after sanitization, and if different, we would inform the users similar to how we inform the user when they are submitting an image without alt text. This would be accurate, but only catchable when the user hits the submit button.