Nullifying user-submitted formatting with CSS -


I am working on an online publication that will accept submissions from the general public. My WYSIWYG editor is set to exclude any embedded style / class tags (except those allowed by the editor), and whenever I am saved I also see it on the server side as a third layer of defense I want to implement some CSS overrides to eliminate any CSS instructions embedded within a certain element of the page. Is this possible? I do not think of the embedded style attributes, but possibly embedded & lt; Style & gt; & Lt; / Style & gt; for blocks and class attributes?

You can make sure that you win in your stylesheet! Important can use any other styling, inline or otherwise out of etc. Live example:

  & lt; Div class = "override" style = "background: salmon; height: 50px; width: 50px;" & Gt; & Lt; / Div & gt; . Override {height: 200px! Important; Width: 200px! Important; Background: Sky! Important; }    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -