travisbrown
Technical User
- Dec 31, 2001
- 1,016
I'm working with this app and need to post the contents of js-generated HTML for serverside processing. The js functions add a bunch of attributes for some dynamic sorting and style.
Obviously I don't want to strip all attributes since there are some persistent attributes for images, etc.
I guess for this particular app, the table tags are all that need to be cleaned.
Any insights before I go muddling with regex?
Obviously I don't want to strip all attributes since there are some persistent attributes for images, etc.
I guess for this particular app, the table tags are all that need to be cleaned.
Any insights before I go muddling with regex?
Code:
<table>
<tbody class="ui-sortable" style="position: relative;"><tr style="background-color: transparent;"><th>Alternates</th><th>Lead Roles</th><th>Work Phone</th><th>Cell Number</th><th>Home Number</th><th> </th></tr></tbody><tbody class="ui-sortable" style="position: relative;"><tr style="background-color: rgb(225, 225, 225);"><th colspan="6">FOECC MANAGER</th></tr><tr style="background-color: transparent;">
<td style="background-color: transparent;">2nd</td>
<td style="background-color: transparent;">TEST NAME</td>
<td style="background-color: transparent;"> </td>
<td style="background-color: transparent;"> </td>
<td style="background-color: transparent;"> </td>
<td style="background-color: transparent;"><img width="13" height="15" class="delete" alt="Delete" src="../_images/delete.png" /></td></tr><tr style="background-color: rgb(225, 225, 225);">