I am trying to write a CSS selector that selects everything except the script elements with hpricot, I can easily select the entire contents of the select-me div and then remove the script elements, but I was wondering if you could use a selector that excludes script elements:
<div class='select-me'> <p>This is some text</p> <script> javascript would be here </script> <p>This is some text</p> </div>
So in the end I come back:
<div class='select-me'> <p>This is some text</p> <p>This is some text</p> </div>
Greetings
source share