I suggested using jQuery code to securely remove text from the client side, as there may be compatibility issues with certain browsers.
If you opt for jQuery, you can include the following code in your webpage:
$(document).ready(function(){
var divContent = $("#wrapper").find("div");
$("#wrapper").html(divContent);
});
If the wrapper div contains additional HTML tags, such as:
<div id="wrapper">
<div id="some-id">aaaa</div>
"this is some texxt"
<div id="some-id-2">bbbb</div>
<p>Hello world</p>
</div>
You can combine HTML tags in the find jQuery function by separating them with commas:
$(document).ready(function(){
var divContent = $("#wrapper").find("div,p");
$("#wrapper").html(divContent);
});
This approach is safer and more tidy.