Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2008-05-30 08:39:04

meenakshi.khatri
New member
Registered: 2008-05-19
Posts: 1

Regular expressions.. need URGENT help!

Hello Everyone,

When i copy any content from microsoft Word and paste it in Xinha, sometimes, it inserts tags in HTML like below

<state /><place />New York</place /></state />

I am using the _clearFonts method to remove these tags and this is my expression

     D = D.replace(/<state \/> <\/state\/><state \/>/g, "");
     D = D.replace(/<\/state \/>/g, "");
     D = D.replace(/<state>/g, "");
     D = D.replace(/<\/state\/>/g, "");
     D=D.replace(/<state>/g,"");
   
    D = D.replace(/<place \/> <\/place\/><place \/>/g, "");
    D = D.replace(/<\/place\/>/g, "");
    D = D.replace(/<\/place \/>/g, "");   
    D = D.replace(/<\/place\/>/g, "");
    D = D.replace(/<place>/g,"");

As u can see, I am trying all the combinations. this works properly in Firefox but in IE, it formats and shows me this when I click "view html code"

New York</place /></state />

Can you tell me if I am making a mistake with my regular expression or what can go wrong?

Thanks in advance,
Mini

Offline

Board footer

Powered by FluxBB