What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » [RESOLVED] JavaScript: Remove <table>blah</table>

[RESOLVED] JavaScript: Remove <table>blah</table>
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: JavaScript: Remove <table>blah</table>
Line breaks are casuing it to break and I can't get the m modifier to work so we can add an extra replace.

js code:
html = html.replace(/\n/gi, "").replace(/\<table.+?table\>/gi, "");

If you wanted to, you could replace the \n with a unique string so it can be put back together again...

js code:
html = html.replace(/\n/gi, "this-used-to-be-a-line-break").replace(/\<table.+?table\>/gi, "");
html = html.replace(/this-used-to-be-a-line-break/gi, "\n");
// This is just so the source formatting looks good when viewed,
// rather than all being on one line

This post was edited on 01-29-2010 at 10:41 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
01-29-2010 10:40 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[RESOLVED] JavaScript: Remove <table>blah</table> - by macgyver08 on 01-29-2010 at 09:32 PM
RE: JavaScript: Remove <table>blah</table> - by matty on 01-29-2010 at 09:37 PM
RE: RE: JavaScript: Remove <table>blah</table> - by macgyver08 on 01-29-2010 at 09:39 PM
RE: JavaScript: Remove <table>blah</table> - by Spunky on 01-29-2010 at 09:45 PM
RE: RE: JavaScript: Remove <table>blah</table> - by macgyver08 on 01-29-2010 at 09:59 PM
RE: JavaScript: Remove <table>blah</table> - by macgyver08 on 01-29-2010 at 10:03 PM
RE: JavaScript: Remove <table>blah</table> - by Spunky on 01-29-2010 at 10:13 PM
RE: JavaScript: Remove <table>blah</table> - by macgyver08 on 01-29-2010 at 10:18 PM
RE: JavaScript: Remove <table>blah</table> - by Spunky on 01-29-2010 at 10:29 PM
RE: JavaScript: Remove <table>blah</table> - by Spunky on 01-29-2010 at 10:40 PM
RE: JavaScript: Remove <table>blah</table> - by macgyver08 on 01-29-2010 at 11:12 PM
RE: JavaScript: Remove <table>blah</table> - by Spunky on 01-29-2010 at 11:48 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On