javascript - Use CSS for certain block (scoped CSS) -


i have application user can paste html code, when ever paste html style tag css rules applied application too.

those css rules should applied pasted code.

found this:

http://www.w3schools.com/tags/att_style_scoped.asp

but works firefox, perfect solution problem.

now i'm thinking parsing pasted css rules , applying them html inline css rules.

is there better solution?

use iframe provide safe way of showing user supplied html code. way when user tries overwrite site bank account still have no access outer-iframe content.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -