I need to remove the surrounding li from a widget that is pulled in with wordpress eg:
<li id="dp-twitter-widget-2" class="widget-container widget-twitter">
That is the one I need to remove, however it must be server side as javascript manipulates it once it is served, so i would imagine a preg_replace with PHP but I cannot intercept it.
test it
for old php version
in wordpress widget you didn’t need to do this work. you can make change on widget class this is link of class between line 546-555 you can see widget output structure with make change on this you can remove li from output
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/widgets.php#L0