I have an element in my html-code, that holds a completely new html code written by a user, for previewing after codeing into a textarea (simple: a web-editor).
My problem starts when the user types in his code with an id or/and a class, that is already in my code.
So imagine this:
<html>
<body>
<div id="hi">That is my text</div>
<textarea id="here_writes_the_user_his_code"></textarea>
<section id="user_input">
<!-- All following is from the user...-->
<html>
<body>
<div id="hi">Too bad, hi has already been used...</div>
</body>
</html>
<!--...til here!-->
</section>
</body>
</html>
Any idea of solving this?