Jump to content

String replacement with embedded script tags


Mahngiel

Recommended Posts

JSFiddle >> http://jsfiddle.net/Mahngiel/gfjfv/

 

I'm writing a plugin for a multi-lang app, where certain list elements are translated.  Accordingly these elements are written into the element with document.write(Var).  Now, in the same list element, there is a number pertaining to said var wrapped in parenthesis that i'm trying to remove.  Examples:

 

All: (10)

White: (3)

et al

 

My hack regex-fu works for elements that are not language-driven, but when it comes to the ones with embedded script tags, the entire page is being replaced.  I understand why this is happening, but I need a viable solution.

 

Any help appreciated!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.